diff options
Diffstat (limited to 'spec/ruby/core/integer/divide_spec.rb')
| -rw-r--r-- | spec/ruby/core/integer/divide_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/integer/divide_spec.rb b/spec/ruby/core/integer/divide_spec.rb index 0d5e16e986..e75432fd83 100644 --- a/spec/ruby/core/integer/divide_spec.rb +++ b/spec/ruby/core/integer/divide_spec.rb @@ -32,7 +32,7 @@ describe "Integer#/" do end it "raises a ZeroDivisionError if the given argument is zero and not a Float" do - -> { 1 / 0 }.should raise_error(ZeroDivisionError) + -> { 1 / 0 }.should.raise(ZeroDivisionError) end it "does NOT raise ZeroDivisionError if the given argument is zero and is a Float" do @@ -46,9 +46,9 @@ describe "Integer#/" do end it "raises a TypeError when given a non-Integer" do - -> { 13 / mock('10') }.should raise_error(TypeError) - -> { 13 / "10" }.should raise_error(TypeError) - -> { 13 / :symbol }.should raise_error(TypeError) + -> { 13 / mock('10') }.should.raise(TypeError) + -> { 13 / "10" }.should.raise(TypeError) + -> { 13 / :symbol }.should.raise(TypeError) end end @@ -97,13 +97,13 @@ describe "Integer#/" do end it "raises a ZeroDivisionError if other is zero and not a Float" do - -> { @bignum / 0 }.should raise_error(ZeroDivisionError) + -> { @bignum / 0 }.should.raise(ZeroDivisionError) end it "raises a TypeError when given a non-numeric" do - -> { @bignum / mock('10') }.should raise_error(TypeError) - -> { @bignum / "2" }.should raise_error(TypeError) - -> { @bignum / :symbol }.should raise_error(TypeError) + -> { @bignum / mock('10') }.should.raise(TypeError) + -> { @bignum / "2" }.should.raise(TypeError) + -> { @bignum / :symbol }.should.raise(TypeError) end end |
