From 36ace535fee16efe81f17b871979f51845fb1270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 10 May 2012 17:22:14 +0200 Subject: specs: add Room#resolve, will be needed by JSON --- spec/room_spec.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spec/room_spec.rb b/spec/room_spec.rb index 92ec90a..b794900 100644 --- a/spec/room_spec.rb +++ b/spec/room_spec.rb @@ -29,17 +29,23 @@ describe EvenDoors::Room do d0.stop.should be_true end # - it "parent and spin should be ok" do + it "parent, spin and resolve should be ok" do s = EvenDoors::Spin.new 'dom0' r0 = EvenDoors::Room.new 'r0', s - r1 = EvenDoors::Room.new 'r0', r0 - r2 = EvenDoors::Room.new 'r0', r1 + r1 = EvenDoors::Room.new 'r1', r0 + r2 = EvenDoors::Room.new 'r2', r1 + r3 = EvenDoors::Room.new 'r3', s + r4 = EvenDoors::Room.new 'r4', r3 r2.parent.should be r1 r1.parent.should be r0 r0.parent.should be s r0.spin.should be s r1.spin.should be s r2.spin.should be s + r3.spin.should be s + r2.resolve('dom0/r0/r1/r2').should be r2 + r3.resolve('dom0/r0/r1/r2').should be r2 + r1.resolve('dom0/r0/r1/r2').should be r2 end # it "route error: no source" do -- cgit v1.1-2-g2b99