summaryrefslogtreecommitdiffstats
path: root/spec/particle_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-02 22:25:14 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-02 22:25:14 +0200
commit50b9b41e1e8b3012c165ea6a4c383273afe37ac3 (patch)
treee945c7d24468703db8e910a9a2f3f03d21d28601 /spec/particle_spec.rb
parentae7b1c31a84bdad05376ceccb8882286185f70d6 (diff)
downloadedoors-ruby-50b9b41e1e8b3012c165ea6a4c383273afe37ac3.zip
edoors-ruby-50b9b41e1e8b3012c165ea6a4c383273afe37ac3.tar.gz
Particle add #set_dst! and specs
Diffstat (limited to 'spec/particle_spec.rb')
-rw-r--r--spec/particle_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/particle_spec.rb b/spec/particle_spec.rb
index 0a7f095..a10a9f9 100644
--- a/spec/particle_spec.rb
+++ b/spec/particle_spec.rb
@@ -94,9 +94,18 @@ describe Iotas::Particle do
lambda { p.add_dst 'action', nil }.should raise_error(NoMethodError)
end
#
+ it "routing: set_dst!" do
+ p = Iotas::Particle.new
+ d0 = Iotas::Door.new 'door0', nil
+ #
+ p.set_dst! 'action', d0
+ p.action.should eql 'action'
+ p.dst.should be d0
+ end
+ #
it "routing: add_dst and split_dst!" do
p = Iotas::Particle.new
- d0 = Iotas::Door.new 'door0', nil
+ d0 = Iotas::Door.new 'door0', nil
#
p.split_dst!
p.room.should be_nil