diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
| commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
| tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/bigdecimal/sqrt_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/bigdecimal/sqrt_spec.rb')
| -rw-r--r-- | spec/ruby/library/bigdecimal/sqrt_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/library/bigdecimal/sqrt_spec.rb b/spec/ruby/library/bigdecimal/sqrt_spec.rb index 75182fcbc8..d149003b9f 100644 --- a/spec/ruby/library/bigdecimal/sqrt_spec.rb +++ b/spec/ruby/library/bigdecimal/sqrt_spec.rb @@ -41,37 +41,37 @@ describe "BigDecimal#sqrt" do end it "raises ArgumentError when no argument is given" do - lambda { + -> { @one.sqrt }.should raise_error(ArgumentError) end it "raises ArgumentError if a negative number is given" do - lambda { + -> { @one.sqrt(-1) }.should raise_error(ArgumentError) end it "raises ArgumentError if 2 arguments are given" do - lambda { + -> { @one.sqrt(1, 1) }.should raise_error(ArgumentError) end it "raises TypeError if nil is given" do - lambda { + -> { @one.sqrt(nil) }.should raise_error(TypeError) end it "raises TypeError if a string is given" do - lambda { + -> { @one.sqrt("stuff") }.should raise_error(TypeError) end it "raises TypeError if a plain Object is given" do - lambda { + -> { @one.sqrt(Object.new) }.should raise_error(TypeError) end @@ -82,7 +82,7 @@ describe "BigDecimal#sqrt" do end it "raises FloatDomainError on negative values" do - lambda { + -> { BigDecimal('-1').sqrt(10) }.should raise_error(FloatDomainError) end @@ -92,13 +92,13 @@ describe "BigDecimal#sqrt" do end it "raises FloatDomainError for negative infinity" do - lambda { + -> { @infinity_minus.sqrt(1) }.should raise_error(FloatDomainError) end it "raises FloatDomainError for NaN" do - lambda { + -> { @nan.sqrt(1) }.should raise_error(FloatDomainError) end |
