summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/room_spec.rb22
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