summaryrefslogtreecommitdiffstats
path: root/spec/room_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-25 15:09:16 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-25 15:09:16 +0200
commitd769f91d90a54fc230c453f43a1064ca0c529196 (patch)
tree04dfae461278ed159f9bac56d56fadb68ba45af0 /spec/room_spec.rb
parentfc456f7b034e59641abb3a950be25d8a5c66b597 (diff)
downloadedoors-ruby-d769f91d90a54fc230c453f43a1064ca0c529196.zip
edoors-ruby-d769f91d90a54fc230c453f43a1064ca0c529196.tar.gz
Specs: replace p.src = with p.init! calls
Diffstat (limited to 'spec/room_spec.rb')
-rw-r--r--spec/room_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/room_spec.rb b/spec/room_spec.rb
index c240ac6..3f62681 100644
--- a/spec/room_spec.rb
+++ b/spec/room_spec.rb
@@ -62,7 +62,7 @@ describe Iotas::Room do
room0 = Iotas::Room.new 'room0', @spin
door0 = Iotas::Door.new 'door0', room0
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', @spin
+ p.init! Fake.new( 'fake', @spin)
p.set_dst! 'get', 'door0'
room0.send_p p
p.action.should eql 'get'
@@ -74,7 +74,7 @@ describe Iotas::Room do
room1 = Iotas::Room.new 'room1', room0
door0 = Iotas::Door.new 'door0', room1
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', @spin
+ p.init! Fake.new('fake', @spin)
p.set_dst! 'get', 'dom0/room0/room1/door0'
room0.send_p p
p.action.should eql 'get'
@@ -94,7 +94,7 @@ describe Iotas::Room do
it "route error: no destination no links" do
room = Iotas::Room.new 'room', @spin
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', @spin
+ p.init! Fake.new('fake', @spin)
room.send_p p
p.action.should eql Iotas::ACT_ERROR
p[Iotas::FIELD_ERROR_MSG].should eql Iotas::ERROR_ROUTE_NDNL
@@ -104,7 +104,7 @@ describe Iotas::Room do
it "route error: no rooom, wrong door -> right room wrong door" do
room0 = Iotas::Room.new 'room0', @spin
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', @spin
+ p.init! Fake.new('fake', @spin)
p.set_dst! 'get', 'nodoor'
room0.send_p p
p.action.should eql Iotas::ACT_ERROR
@@ -115,7 +115,7 @@ describe Iotas::Room do
it "route error: right rooom, wrong door -> right room wrong door" do
room0 = Iotas::Room.new 'room0', @spin
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', @spin
+ p.init! Fake.new('fake', @spin)
p.set_dst! 'get', 'dom0/room0/nodoor'
room0.send_p p
p.action.should eql Iotas::ACT_ERROR
@@ -127,7 +127,7 @@ describe Iotas::Room do
room0 = Iotas::Room.new 'room0', @spin
room1 = Iotas::Room.new 'room1', room0
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', room0
+ p.init! Fake.new('fake', room0)
p.set_dst! 'get', 'dom0/room0/nodoor'
room1.send_p p
p.action.should eql Iotas::ACT_ERROR
@@ -139,7 +139,7 @@ describe Iotas::Room do
room0 = Iotas::Room.new 'room0', @spin
room1 = Iotas::Room.new 'room1', room0
p = @spin.require_p Iotas::Particle
- p.src = Fake.new 'fake', @spin
+ p.init! Fake.new('fake', @spin)
p.set_dst! 'get', 'dom0/noroom/fake'
room1.send_p p
p.action.should eql Iotas::ACT_ERROR
@@ -151,7 +151,7 @@ describe Iotas::Room do
room0 = Iotas::Room.new 'room0', @spin
door0 = Iotas::Door.new 'door0', room0
p = @spin.require_p Iotas::Particle
- p.src = door0
+ p.init! door0
p.set_dst! 'get'
room0.send_p p
p.action.should eql 'get'