diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-09 10:25:44 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-09 10:25:44 +0200 |
commit | e6176c2e5db763dc429158ce894492ec6e7b823f (patch) | |
tree | 11db81590085fce64d11a4118a14df804713d3cf /spec | |
parent | 2dc20ea5c1bf72e996e99d60b42d4e71d04d2462 (diff) | |
download | edoors-ruby-e6176c2e5db763dc429158ce894492ec6e7b823f.zip edoors-ruby-e6176c2e5db763dc429158ce894492ec6e7b823f.tar.gz |
specs: update to reflect new Room routing way
Diffstat (limited to 'spec')
-rw-r--r-- | spec/evendoors_spec.rb | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/spec/evendoors_spec.rb b/spec/evendoors_spec.rb index 19e56b4..99930c0 100644 --- a/spec/evendoors_spec.rb +++ b/spec/evendoors_spec.rb @@ -464,12 +464,13 @@ describe EvenDoors do r2.space.should be s end # - it "route error: no destination no source" do + it "route error: no source" do room = EvenDoors::Room.new 'room', nil p = EvenDoors::Twirl.require_p EvenDoors::Particle + p.set_dst! 'get', 'room/door' room.send_p p p.action.should eql EvenDoors::ACT_ERROR - p[EvenDoors::ERROR_FIELD].should eql EvenDoors::ERROR_ROUTE_NDNS + p[EvenDoors::ERROR_FIELD].should eql EvenDoors::ERROR_ROUTE_NS p.dst.should be room.space end # @@ -510,11 +511,12 @@ describe EvenDoors do room0 = EvenDoors::Room.new 'room0', nil room1 = EvenDoors::Room.new 'room1', room0 p = EvenDoors::Twirl.require_p EvenDoors::Particle + p.src = Fake.new p.set_dst! 'get', 'room0/nodoor' room1.send_p p p.action.should eql EvenDoors::ACT_ERROR p[EvenDoors::ERROR_FIELD].should eql EvenDoors::ERROR_ROUTE_RRWD - p.dst.should be room1.space + p.dst.should be p.src end # it "routing success (direct)" do @@ -566,17 +568,6 @@ describe EvenDoors do p.dst.should be door0 end # - it "routing success: no door name -> src" do - room0 = EvenDoors::Room.new 'room0', nil - door0 = EvenDoors::Door.new 'door0', room0 - p = EvenDoors::Twirl.require_p EvenDoors::Particle - p.set_dst! 'get' - room0.send_p p - p.action.should eql EvenDoors::ACT_ERROR - p[EvenDoors::ERROR_FIELD].should eql EvenDoors::ERROR_ROUTE_NDNS - p.dst.should be room0.space - end - # # end end |