diff options
Diffstat (limited to 'spec/ruby/shared/sizedqueue/max.rb')
| -rw-r--r-- | spec/ruby/shared/sizedqueue/max.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/shared/sizedqueue/max.rb b/spec/ruby/shared/sizedqueue/max.rb index ea10d24be0..167f669275 100644 --- a/spec/ruby/shared/sizedqueue/max.rb +++ b/spec/ruby/shared/sizedqueue/max.rb @@ -19,7 +19,7 @@ describe :sizedqueue_max=, shared: true do q.enq 2 q.enq 3 q.max = 2 - (q.size > q.max).should be_true + (q.size > q.max).should == true q.deq.should == 1 q.deq.should == 2 q.deq.should == 3 @@ -27,21 +27,21 @@ describe :sizedqueue_max=, shared: true do it "raises a TypeError when given a non-numeric value" do q = @object.call(5) - -> { q.max = "foo" }.should raise_error(TypeError) - -> { q.max = Object.new }.should raise_error(TypeError) + -> { q.max = "foo" }.should.raise(TypeError) + -> { q.max = Object.new }.should.raise(TypeError) end it "raises an argument error when set to zero" do q = @object.call(5) q.max.should == 5 - -> { q.max = 0 }.should raise_error(ArgumentError) + -> { q.max = 0 }.should.raise(ArgumentError) q.max.should == 5 end it "raises an argument error when set to a negative number" do q = @object.call(5) q.max.should == 5 - -> { q.max = -1 }.should raise_error(ArgumentError) + -> { q.max = -1 }.should.raise(ArgumentError) q.max.should == 5 end end |
