summaryrefslogtreecommitdiffstats
path: root/spec/room_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-27 17:18:15 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-27 17:18:15 +0200
commit675eec2cac3585c6d23da79540d64dfb3d2fbe68 (patch)
tree8aac9e816b197a01e0a6c7b288196e5f7ee86222 /spec/room_spec.rb
parent1d70922b515eb58eb5b312db86142b639b2b2485 (diff)
downloadedoors-ruby-675eec2cac3585c6d23da79540d64dfb3d2fbe68.zip
edoors-ruby-675eec2cac3585c6d23da79540d64dfb3d2fbe68.tar.gz
Room: fix _try_links, add specs
Diffstat (limited to 'spec/room_spec.rb')
-rw-r--r--spec/room_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/room_spec.rb b/spec/room_spec.rb
index 3757951..c0b361e 100644
--- a/spec/room_spec.rb
+++ b/spec/room_spec.rb
@@ -220,15 +220,16 @@ describe Edoors::Room do
attr_reader :count
def receive_p p
@count||=0
+ ['0','1','2'][@count].should == p.next_dst
@count += 1
end
end
door1 = Out.new 'door1', room0
- room0.add_link Edoors::Link.new('door0', 'door1')
- room0.add_link Edoors::Link.new('door0', 'door1', 'keys', {'f0'=>'v0'})
- room0.add_link Edoors::Link.new('door0', 'door1', 'keys', {'f0'=>'v0','f1'=>'v1'})
- room0.add_link Edoors::Link.new('door0', 'door1', 'keys', {'f0'=>'v0','f1'=>'v2'})
- room0.add_link Edoors::Link.new('door0', 'door1', 'keys', {'f0'=>'v0','f2'=>'v1'})
+ room0.add_link Edoors::Link.new('door0', ['door1','0'])
+ room0.add_link Edoors::Link.new('door0', ['door1','1'], 'keys', {'f0'=>'v0'})
+ room0.add_link Edoors::Link.new('door0', ['door1','2'], 'keys', {'f0'=>'v0','f1'=>'v1'})
+ room0.add_link Edoors::Link.new('door0', ['door1','3'], 'keys', {'f0'=>'v0','f1'=>'v2'})
+ room0.add_link Edoors::Link.new('door0', ['door1','4'], 'keys', {'f0'=>'v0','f2'=>'v1'})
p = @spin.require_p Edoors::Particle
p['f0']='v0'
p['f1']='v1'