From c0bd4e945aac826226e327a43fec6fd3534452b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 18 Jun 2012 09:47:42 +0200 Subject: specs: cover SYS_ACT_ADD_ROOM --- spec/room_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- cgit v1.1-2-g2b99