diff options
Diffstat (limited to 'spec/ruby/core/array/max_spec.rb')
| -rw-r--r-- | spec/ruby/core/array/max_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/array/max_spec.rb b/spec/ruby/core/array/max_spec.rb index d1c64519d0..868275a748 100644 --- a/spec/ruby/core/array/max_spec.rb +++ b/spec/ruby/core/array/max_spec.rb @@ -2,7 +2,7 @@ require_relative '../../spec_helper' describe "Array#max" do it "is defined on Array" do - [1].method(:max).owner.should equal Array + [1].method(:max).owner.should.equal? Array end it "returns nil with no values" do @@ -70,16 +70,16 @@ describe "Array#max" do it "raises a NoMethodError for elements without #<=>" do -> do [BasicObject.new, BasicObject.new].max - end.should raise_error(NoMethodError) + end.should.raise(NoMethodError) end it "raises an ArgumentError for incomparable elements" do -> do [11,"22"].max - end.should raise_error(ArgumentError) + end.should.raise(ArgumentError) -> do [11,12,22,33].max{|a, b| nil} - end.should raise_error(ArgumentError) + end.should.raise(ArgumentError) end it "returns the maximum element (with block)" do |
