diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-18 11:40:38 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-18 11:40:38 +0200 |
commit | 3e01a17ec9ed22867b409ffedab20e160de90ff7 (patch) | |
tree | d6708850502d3b320c4ea1c8bd2e37bd68a9b9c2 /spec/door_spec.rb | |
parent | 18164a443ff6a6c4547e54357e48cd473298a806 (diff) | |
download | edoors-ruby-3e01a17ec9ed22867b409ffedab20e160de90ff7.zip edoors-ruby-3e01a17ec9ed22867b409ffedab20e160de90ff7.tar.gz |
social skills failure ;) evendoors-ruby is renamed into iotas
Diffstat (limited to 'spec/door_spec.rb')
-rw-r--r-- | spec/door_spec.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/door_spec.rb b/spec/door_spec.rb index 254d59c..3d93518 100644 --- a/spec/door_spec.rb +++ b/spec/door_spec.rb @@ -4,10 +4,10 @@ require 'spec_helper' # -describe EvenDoors::Door do +describe Iotas::Door do # before (:all) do - @spin = EvenDoors::Spin.new 'dom0' + @spin = Iotas::Spin.new 'dom0' end # before(:each) do @@ -15,29 +15,29 @@ describe EvenDoors::Door do end # it "require_p release_p" do - door = EvenDoors::Door.new 'hell', @spin - p0 = door.require_p EvenDoors::Particle + door = Iotas::Door.new 'hell', @spin + p0 = door.require_p Iotas::Particle p0.src.should be door - p1 = door.require_p EvenDoors::Particle + p1 = door.require_p Iotas::Particle p1.src.should be door (p0===p1).should be_false door.release_p p0 - p2 = door.require_p EvenDoors::Particle + p2 = door.require_p Iotas::Particle p2.src.should be door (p0===p2).should be_true end # it "NoMethodError when receive_p not overridden" do - class Door0 < EvenDoors::Door + class Door0 < Iotas::Door end f = Fake.new 'fake', @spin d0 = Door0.new 'door0', f - p0 = d0.require_p EvenDoors::Particle + p0 = d0.require_p Iotas::Particle lambda { d0.process_p p0 }.should raise_error(NoMethodError) end # it "send_p, send_sys_p, release_p and release of lost particles" do - class Door0 < EvenDoors::Door + class Door0 < Iotas::Door def receive_p p case p.action when 'RELEASE' @@ -53,7 +53,7 @@ describe EvenDoors::Door do end f = Fake.new 'fake', @spin d0 = Door0.new 'door0', f - p0 = d0.require_p EvenDoors::Particle + p0 = d0.require_p Iotas::Particle # p0.set_dst! 'SEND' p0.split_dst! @@ -68,23 +68,23 @@ describe EvenDoors::Door do p0.set_dst! 'RELEASE' p0.split_dst! d0.process_p p0 - p1 = d0.require_p EvenDoors::Particle + p1 = d0.require_p Iotas::Particle p1.should be p0 # p0.set_dst! 'LOST' p0.split_dst! d0.process_p p0 - p1 = d0.require_p EvenDoors::Particle + p1 = d0.require_p Iotas::Particle p1.should be p0 # d0.process_sys_p p0 - p1 = @spin.require_p EvenDoors::Particle + p1 = @spin.require_p Iotas::Particle p1.should be p0 end # it "door->json->door" do - door = EvenDoors::Door.new 'hell', @spin - hell = EvenDoors::Door.json_create( JSON.load( JSON.generate(door) ) ) + door = Iotas::Door.new 'hell', @spin + hell = Iotas::Door.json_create( JSON.load( JSON.generate(door) ) ) door.name.should eql hell.name JSON.generate(door).should eql JSON.generate(hell) end |