diff options
Diffstat (limited to 'spec/ruby/core/rational/plus_spec.rb')
| -rw-r--r-- | spec/ruby/core/rational/plus_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/rational/plus_spec.rb b/spec/ruby/core/rational/plus_spec.rb index 01df5f6719..92f830a105 100644 --- a/spec/ruby/core/rational/plus_spec.rb +++ b/spec/ruby/core/rational/plus_spec.rb @@ -29,22 +29,22 @@ end describe "Rational#+ with a Rational" do it "returns the result of subtracting other from self as a Rational" do - (Rational(3, 4) + Rational(0, 1)).should eql(Rational(3, 4)) - (Rational(3, 4) + Rational(1, 4)).should eql(Rational(1, 1)) + (Rational(3, 4) + Rational(0, 1)).should.eql?(Rational(3, 4)) + (Rational(3, 4) + Rational(1, 4)).should.eql?(Rational(1, 1)) - (Rational(3, 4) + Rational(2, 1)).should eql(Rational(11, 4)) + (Rational(3, 4) + Rational(2, 1)).should.eql?(Rational(11, 4)) end end describe "Rational#+ with a Float" do it "returns the result of subtracting other from self as a Float" do - (Rational(3, 4) + 0.2).should eql(0.95) - (Rational(3, 4) + 2.5).should eql(3.25) + (Rational(3, 4) + 0.2).should.eql?(0.95) + (Rational(3, 4) + 2.5).should.eql?(3.25) end end describe "Rational#+ with an Integer" do it "returns the result of subtracting other from self as a Rational" do - (Rational(3, 4) + 1).should eql(Rational(7, 4)) - (Rational(3, 4) + 2).should eql(Rational(11, 4)) + (Rational(3, 4) + 1).should.eql?(Rational(7, 4)) + (Rational(3, 4) + 2).should.eql?(Rational(11, 4)) end end |
