diff options
Diffstat (limited to 'spec/ruby/core/math/shared/atanh.rb')
| -rw-r--r-- | spec/ruby/core/math/shared/atanh.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/math/shared/atanh.rb b/spec/ruby/core/math/shared/atanh.rb index 3fb64153a0..48a6bf836e 100644 --- a/spec/ruby/core/math/shared/atanh.rb +++ b/spec/ruby/core/math/shared/atanh.rb @@ -1,6 +1,6 @@ describe :math_atanh_base, shared: true do it "returns a float" do - @object.send(@method, 0.5).should be_an_instance_of(Float) + @object.send(@method, 0.5).should.instance_of?(Float) end it "returns the inverse hyperbolic tangent of the argument" do @@ -11,11 +11,11 @@ describe :math_atanh_base, shared: true do end it "raises a TypeError if the argument is nil" do - -> { @object.send(@method, nil) }.should raise_error(TypeError) + -> { @object.send(@method, nil) }.should.raise(TypeError) end it "raises a TypeError if the argument is not a Numeric" do - -> { @object.send(@method, "test") }.should raise_error(TypeError) + -> { @object.send(@method, "test") }.should.raise(TypeError) end it "returns Infinity if x == 1.0" do @@ -29,16 +29,16 @@ end describe :math_atanh_private, shared: true do it "is a private instance method" do - Math.should have_private_instance_method(@method) + Math.private_instance_methods(false).should.include?(@method) end end describe :math_atanh_no_complex, shared: true do it "raises a Math::DomainError for arguments greater than 1.0" do - -> { @object.send(@method, 1.0 + Float::EPSILON) }.should raise_error(Math::DomainError) + -> { @object.send(@method, 1.0 + Float::EPSILON) }.should.raise(Math::DomainError) end it "raises a Math::DomainError for arguments less than -1.0" do - -> { @object.send(@method, -1.0 - Float::EPSILON) }.should raise_error(Math::DomainError) + -> { @object.send(@method, -1.0 - Float::EPSILON) }.should.raise(Math::DomainError) end end |
