diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-22 23:36:09 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-22 23:36:09 +0200 |
commit | c98777107213c48f7a04a1d3f3d8b6e4afba8f9d (patch) | |
tree | 31ba8ba4240a712b1dd5b7161416c212d926ed85 | |
parent | c0bd4e945aac826226e327a43fec6fd3534452b9 (diff) | |
download | edoors-ruby-c98777107213c48f7a04a1d3f3d8b6e4afba8f9d.zip edoors-ruby-c98777107213c48f7a04a1d3f3d8b6e4afba8f9d.tar.gz |
Particle: fix set_dst! complete specs
-rw-r--r-- | lib/edoors/particle.rb | 1 | ||||
-rw-r--r-- | spec/particle_spec.rb | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/edoors/particle.rb b/lib/edoors/particle.rb index 84f6ece..f659fbc 100644 --- a/lib/edoors/particle.rb +++ b/lib/edoors/particle.rb @@ -122,6 +122,7 @@ module Edoors if d.is_a? Edoors::Iota @dst = d else + @dst = nil _split_path! d end end diff --git a/spec/particle_spec.rb b/spec/particle_spec.rb index cf51299..fe6508f 100644 --- a/spec/particle_spec.rb +++ b/spec/particle_spec.rb @@ -110,6 +110,12 @@ describe Edoors::Particle do p.set_dst! 'action', d0 p.action.should eql 'action' p.dst.should be d0 + # + p.set_dst! 'action', '/world/room/door' + p.action.should eql 'action' + p.dst.should be nil + p.room.should eql '/world/room' + p.door.should eql 'door' end # it "routing: add_dst and split_dst!" do |