diff options
Diffstat (limited to 'spec/ruby/core/float/comparison_spec.rb')
| -rw-r--r-- | spec/ruby/core/float/comparison_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/float/comparison_spec.rb b/spec/ruby/core/float/comparison_spec.rb index d2e47937ff..e9adf2fd6a 100644 --- a/spec/ruby/core/float/comparison_spec.rb +++ b/spec/ruby/core/float/comparison_spec.rb @@ -29,10 +29,10 @@ describe "Float#<=>" do end it "returns nil when the given argument is not a Float" do - (1.0 <=> "1").should be_nil - (1.0 <=> "1".freeze).should be_nil - (1.0 <=> :one).should be_nil - (1.0 <=> true).should be_nil + (1.0 <=> "1").should == nil + (1.0 <=> "1".freeze).should == nil + (1.0 <=> :one).should == nil + (1.0 <=> true).should == nil end it "compares using #coerce when argument is not a Float" do @@ -62,7 +62,7 @@ describe "Float#<=>" do bad_coercible = klass.new -> { 4.2 <=> bad_coercible - }.should raise_error(TypeError, "coerce must return [x, y]") + }.should.raise(TypeError, "coerce must return [x, y]") end it "returns the correct result when one side is infinite" do @@ -91,7 +91,7 @@ describe "Float#<=>" do it "returns 1 when self is Infinity and other is infinite?=nil (which means finite)" do obj = Object.new def obj.infinite? - nil + nil end (infinity_value <=> obj).should == 1 end |
