1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-12-27 17:35:32 +01:00
parent 267bed0cd9
commit 727c97da19
108 changed files with 1325 additions and 270 deletions

View file

@ -19,7 +19,7 @@ describe "Complex#coerce" do
result.last.should be_kind_of(Complex)
end
it "returns an array containing other and self as Complex when other is an Integer" do
it "returns an array containing other and self as Complex when other is a Bignum" do
result = @one.coerce(4294967296)
result.should == [4294967296, 1]
result.first.should be_kind_of(Complex)

View file

@ -12,7 +12,7 @@ describe :complex_divide, shared: true do
end
end
describe "with Integer" do
describe "with Fixnum" do
it "divides both parts of the Complex number" do
Complex(20, 40).send(@method, 2).should == Complex(10, 20)
Complex(30, 30).send(@method, 10).should == Complex(3, 3)
@ -27,7 +27,7 @@ describe :complex_divide, shared: true do
end
end
describe "with Integer" do
describe "with Bignum" do
it "divides both parts of the Complex number" do
Complex(20, 40).send(@method, 2).should == Complex(10, 20)
Complex(15, 16).send(@method, 2.0).should be_close(Complex(7.5, 8), TOLERANCE)