diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-03 00:25:33 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-03 00:25:33 +0200 |
commit | 3acfb2c015df1af71db3bb16c26e01ffdd56962e (patch) | |
tree | 5f8e49631e4961f679096ce387af6ff4eb6e10ff | |
parent | fae3c11413e2ac56b4a4e2737fef8550f929d350 (diff) | |
download | edoors-ruby-3acfb2c015df1af71db3bb16c26e01ffdd56962e.zip edoors-ruby-3acfb2c015df1af71db3bb16c26e01ffdd56962e.tar.gz |
fix room specs to follow new particle reset policy
-rw-r--r-- | spec/room_spec.rb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/spec/room_spec.rb b/spec/room_spec.rb index c7cabd0..fb4c297 100644 --- a/spec/room_spec.rb +++ b/spec/room_spec.rb @@ -197,30 +197,22 @@ describe Iotas::Room do room0 = Iotas::Room.new 'room0', @spin door0 = Iotas::Door.new 'door0', room0 class Out < Iotas::Door - attr_reader :ps + attr_reader :count def receive_p p - @ps||=[] - @ps << p + @count||=0 + @count += 1 end end door1 = Out.new 'door1', room0 room0.add_link Iotas::Link.new('door0', 'door1') room0.add_link Iotas::Link.new('door0', 'door1', 'fields', 'f0,f1', 'v0v1') + room0.add_link Iotas::Link.new('door0', 'door1', 'fields', 'f0,f1', 'v0v2') p = @spin.require_p Iotas::Particle p['f0']='v0' p['f1']='v1' door0.send_p p @spin.spin! - door1.ps.length.should eql 2 - p0 = door1.ps[0] - p0.action.should be_nil - p0.src.should be door0 - p0.dst.should be_nil - p1 = door1.ps[1] - p1.action.should be_nil - p1.src.should be door0 - p1.dst.should be_nil - p1.should be p + door1.count.should eql 2 end # it "system route error: system no destination" do |