summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-18 09:47:42 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-18 09:51:00 +0200
commitc0bd4e945aac826226e327a43fec6fd3534452b9 (patch)
tree623d4d53fa7e59e1810a89ffd343ced728048c00 /spec
parent394ec7f39a83df5edd3eef6667b16698ed689407 (diff)
downloadedoors-ruby-c0bd4e945aac826226e327a43fec6fd3534452b9.zip
edoors-ruby-c0bd4e945aac826226e327a43fec6fd3534452b9.tar.gz
specs: cover SYS_ACT_ADD_ROOM
Diffstat (limited to 'spec')
-rw-r--r--spec/room_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/room_spec.rb b/spec/room_spec.rb
index 1c994e2..de697c1 100644
--- a/spec/room_spec.rb
+++ b/spec/room_spec.rb
@@ -293,6 +293,22 @@ describe Edoors::Room do
p.dst.should be door1
end
#
+ it "SYS_ACT_ADD_ROOM" do
+ room0 = Edoors::Room.new 'room0', @spin
+ p0 = @spin.require_p Edoors::Particle
+ p0.set_data Edoors::IOTA_NAME, 'roomX'
+ p0.add_dst Edoors::SYS_ACT_ADD_ROOM, room0.path
+ room0.send_sys_p p0
+ p1 = @spin.require_p Edoors::Particle
+ p1.set_data Edoors::IOTA_NAME, 'roomY'
+ p1.set_dst! Edoors::SYS_ACT_ADD_ROOM, room0
+ @spin.send_sys_p p1
+ @spin.spin!
+ @spin.search_world('dom0/room0/roomX').should be_a Edoors::Room
+ @spin.search_world('dom0/room0/roomY').should be_a Edoors::Room
+ @spin.search_world('dom0/room0/roomZ').should be nil
+ end
+ #
it "room->json->room" do
r0 = Edoors::Room.new 'r0', @spin
r1 = Edoors::Room.new 'r1', r0