summaryrefslogtreecommitdiff
path: root/spec/ruby/core/math/atan2_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/math/atan2_spec.rb')
-rw-r--r--spec/ruby/core/math/atan2_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/core/math/atan2_spec.rb b/spec/ruby/core/math/atan2_spec.rb
index ef8f9bb78f..1f1de506c5 100644
--- a/spec/ruby/core/math/atan2_spec.rb
+++ b/spec/ruby/core/math/atan2_spec.rb
@@ -1,9 +1,9 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "Math.atan2" do
it "returns a float" do
- Math.atan2(1.2, 0.5).should be_kind_of(Float)
+ Math.atan2(1.2, 0.5).should.is_a?(Float)
end
it "returns the arc tangent of y, x" do
@@ -14,15 +14,15 @@ describe "Math.atan2" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.atan2(1.0, "test") }.should raise_error(TypeError)
- lambda { Math.atan2("test", 0.0) }.should raise_error(TypeError)
- lambda { Math.atan2("test", "this") }.should raise_error(TypeError)
+ -> { Math.atan2(1.0, "test") }.should.raise(TypeError)
+ -> { Math.atan2("test", 0.0) }.should.raise(TypeError)
+ -> { Math.atan2("test", "this") }.should.raise(TypeError)
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.atan2(nil, 1.0) }.should raise_error(TypeError)
- lambda { Math.atan2(-1.0, nil) }.should raise_error(TypeError)
- lambda { Math.atan2(nil, nil) }.should raise_error(TypeError)
+ -> { Math.atan2(nil, 1.0) }.should.raise(TypeError)
+ -> { Math.atan2(-1.0, nil) }.should.raise(TypeError)
+ -> { Math.atan2(nil, nil) }.should.raise(TypeError)
end
it "accepts any argument that can be coerced with Float()" do