diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 17:22:14 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 17:22:14 +0200 |
commit | 36ace535fee16efe81f17b871979f51845fb1270 (patch) | |
tree | f30fedfa5eb0533b8448e97d81bc1834d32165e8 /spec/room_spec.rb | |
parent | 41f2adace41c562ea1ed486130c72eb4d1503044 (diff) | |
download | edoors-ruby-36ace535fee16efe81f17b871979f51845fb1270.zip edoors-ruby-36ace535fee16efe81f17b871979f51845fb1270.tar.gz |
specs: add Room#resolve, will be needed by JSON
Diffstat (limited to 'spec/room_spec.rb')
-rw-r--r-- | spec/room_spec.rb | 12 |
1 files 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 |