diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-09 12:22:15 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-09 12:22:15 +0200 |
commit | 32c471bcc52820f91dfb994d74f38cb881be825e (patch) | |
tree | 193a2cd057835f8c6e69aab3ef3496d45c06b57a /spec | |
parent | 55d345f084917801ee8a6dd6e492f96718b88365 (diff) | |
download | edoors-ruby-32c471bcc52820f91dfb994d74f38cb881be825e.zip edoors-ruby-32c471bcc52820f91dfb994d74f38cb881be825e.tar.gz |
specs: complete Room coverage using SYS_ACT_ADD_LINK msg to set a link and test it
Diffstat (limited to 'spec')
-rw-r--r-- | spec/evendoors_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/evendoors_spec.rb b/spec/evendoors_spec.rb index 9785587..7bbc5b5 100644 --- a/spec/evendoors_spec.rb +++ b/spec/evendoors_spec.rb @@ -700,5 +700,29 @@ describe EvenDoors do p.dst.should be door0 end # + it "SYS_ACT_ADD_LINK should work" do + EvenDoors::Twirl.clear! + space = EvenDoors::Space.new 'space' # needed to be able to route to door + room0 = EvenDoors::Room.new 'room0', space + door0 = EvenDoors::Door.new 'door0', room0 + door1 = EvenDoors::Door.new 'door1', room0 + p0 = EvenDoors::Twirl.require_p EvenDoors::Particle + p0.set_data EvenDoors::LNK_SRC, 'door0' + p0.set_data EvenDoors::LNK_DSTS, 'door1' + p0.set_data EvenDoors::LNK_FIELDS, 'fields' + p0.set_data EvenDoors::LNK_CONDF, 'f0,f1' + p0.set_data EvenDoors::LNK_CONDV, 'v0v1' + p0.set_dst! EvenDoors::SYS_ACT_ADD_LINK, room0.path + room0.send_sys_p p0 + space.twirl! + p = EvenDoors::Twirl.require_p EvenDoors::Particle + p['f0']='v0' + p['f1']='v1' + door0.send_p p + p.action.should be_nil + p.src.should be door0 + p.dst.should be door1 + end + # end end |