diff options
-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 |