diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-03 11:17:14 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-03 11:17:14 +0200 |
commit | 4bf831d32813f9389f1fa6c8edcda2bd84143af9 (patch) | |
tree | 90d1f553d33d5b72055bbe3861ed6ca85a279221 /spec | |
parent | 13d45d30186072b1973ccd6a547bfc8ecce97af0 (diff) | |
download | edoors-ruby-4bf831d32813f9389f1fa6c8edcda2bd84143af9.zip edoors-ruby-4bf831d32813f9389f1fa6c8edcda2bd84143af9.tar.gz |
specs: add direct routing through path specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/room_spec.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/room_spec.rb b/spec/room_spec.rb index fb4c297..de4b55e 100644 --- a/spec/room_spec.rb +++ b/spec/room_spec.rb @@ -69,7 +69,7 @@ describe Iotas::Room do p.dst.should be door0 end # - it "routing success (direct send)" do + it "routing success (direct send to self)" do room0 = Iotas::Room.new 'room0', @spin door0 = Iotas::Door.new 'door0', room0 p = @spin.require_p Iotas::Particle @@ -79,6 +79,26 @@ describe Iotas::Room do p.dst.should be door0 end # + it "routing success (direct send to pointer)" do + room0 = Iotas::Room.new 'room0', @spin + door0 = Iotas::Door.new 'door0', room0 + p = @spin.require_p Iotas::Particle + p.init! Fake.new( 'fake', @spin) + door0.send_p p, 'get', door0 + p.action.should eql 'get' + p.dst.should be door0 + end + # + it "routing success (direct send to path)" do + room0 = Iotas::Room.new 'room0', @spin + door0 = Iotas::Door.new 'door0', room0 + p = @spin.require_p Iotas::Particle + p.init! Fake.new( 'fake', @spin) + door0.send_p p, 'get', door0.path + p.action.should eql 'get' + p.dst.should be door0 + end + # it "routing success through Spin@world" do room0 = Iotas::Room.new 'room0', @spin room1 = Iotas::Room.new 'room1', room0 |