summaryrefslogtreecommitdiffstats
path: root/spec/door_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy.zurcher@heraeus.com>2015-01-12 10:13:58 +0100
committerJérémy Zurcher <jeremy.zurcher@heraeus.com>2015-01-12 10:13:58 +0100
commit4f065f63125907b3a4f72fbab8722c58ccab41c1 (patch)
tree3add5b782e0c86ffcf61d1b4e4dae769b7aa89c4 /spec/door_spec.rb
parent6b69e8e7806ade8fc36505f9ca358edd1572acef (diff)
downloadedoors-ruby-4f065f63125907b3a4f72fbab8722c58ccab41c1.zip
edoors-ruby-4f065f63125907b3a4f72fbab8722c58ccab41c1.tar.gz
support rspec 3.0HEADmaster
Diffstat (limited to 'spec/door_spec.rb')
-rw-r--r--spec/door_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/door_spec.rb b/spec/door_spec.rb
index d86bb5a..9f909a5 100644
--- a/spec/door_spec.rb
+++ b/spec/door_spec.rb
@@ -18,10 +18,10 @@ describe Edoors::Door do
door = Edoors::Door.new 'hell', @spin
p0 = door.require_p Edoors::Particle
p1 = door.require_p
- (p0===p1).should be_false
+ expect(p0===p1).to be_falsey
door.release_p p0
p2 = door.require_p
- (p0===p2).should be_true
+ expect(p0===p2).to be_truthy
end
#
it "NoMethodError when receive_p not overridden" do
@@ -30,7 +30,7 @@ describe Edoors::Door do
f = Fake.new 'fake', @spin
d0 = Door0.new 'door0', f
p0 = d0.require_p Edoors::Particle
- lambda { d0.process_p p0 }.should raise_error(NoMethodError)
+ expect(lambda { d0.process_p p0 }).to raise_error(NoMethodError)
end
#
it "send_p, send_sys_p, release_p and release of lost particles" do
@@ -55,39 +55,39 @@ describe Edoors::Door do
p0.add_dst 'SEND'
p0.split_dst!
d0.process_p p0
- f.p.should eql p0
+ expect(f.p).to eql p0
p0.clear_dsts!
#
p0.add_dst 'SEND_SYS'
p0.split_dst!
d0.process_p p0
- f.sp.should eql p0
+ expect(f.sp).to eql p0
p0.clear_dsts!
#
p0.add_dst 'RELEASE'
p0.split_dst!
d0.process_p p0
p1 = d0.require_p
- p1.should be p0
+ expect(p1).to be p0
p0.clear_dsts!
#
p0.add_dst 'LOST'
p0.split_dst!
d0.process_p p0
p1 = d0.require_p Edoors::Particle
- p1.should be p0
+ expect(p1).to be p0
p0.clear_dsts!
#
d0.process_sys_p p0
p1 = @spin.require_p Edoors::Particle
- p1.should be p0
+ expect(p1).to be p0
end
#
it "door->json->door" do
door = Edoors::Door.new 'hell', @spin
hell = Edoors::Door.json_create( JSON.load( JSON.generate(door) ) )
- door.name.should eql hell.name
- JSON.generate(door).should eql JSON.generate(hell)
+ expect(door.name).to eql hell.name
+ expect(JSON.generate(door)).to eql JSON.generate(hell)
end
#
end