mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@4ce9f41
This commit is contained in:
parent
267bed0cd9
commit
727c97da19
108 changed files with 1325 additions and 270 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue