mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -126,16 +126,16 @@ describe "Kernel.Complex()" do
|
|||
|
||||
describe "when passed a non-Numeric second argument" do
|
||||
it "raises TypeError" do
|
||||
lambda { Complex(:sym, :sym) }.should raise_error(TypeError)
|
||||
lambda { Complex(0, :sym) }.should raise_error(TypeError)
|
||||
-> { Complex(:sym, :sym) }.should raise_error(TypeError)
|
||||
-> { Complex(0, :sym) }.should raise_error(TypeError)
|
||||
end
|
||||
end
|
||||
|
||||
describe "when passed nil" do
|
||||
it "raises TypeError" do
|
||||
lambda { Complex(nil) }.should raise_error(TypeError, "can't convert nil into Complex")
|
||||
lambda { Complex(0, nil) }.should raise_error(TypeError, "can't convert nil into Complex")
|
||||
lambda { Complex(nil, 0) }.should raise_error(TypeError, "can't convert nil into Complex")
|
||||
-> { Complex(nil) }.should raise_error(TypeError, "can't convert nil into Complex")
|
||||
-> { Complex(0, nil) }.should raise_error(TypeError, "can't convert nil into Complex")
|
||||
-> { Complex(nil, 0) }.should raise_error(TypeError, "can't convert nil into Complex")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -155,7 +155,7 @@ describe "Kernel.Complex()" do
|
|||
|
||||
describe "and [non-Numeric, Numeric] argument" do
|
||||
it "throws a TypeError" do
|
||||
lambda { Complex(:sym, 0, exception: false) }.should raise_error(TypeError, "not a real")
|
||||
-> { Complex(:sym, 0, exception: false) }.should raise_error(TypeError, "not a real")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue