diff options
Diffstat (limited to 'spec/ruby/core/math/frexp_spec.rb')
| -rw-r--r-- | spec/ruby/core/math/frexp_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/math/frexp_spec.rb b/spec/ruby/core/math/frexp_spec.rb index 4c529b0911..6853e4672f 100644 --- a/spec/ruby/core/math/frexp_spec.rb +++ b/spec/ruby/core/math/frexp_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/classes' describe "Math.frexp" do it "returns the normalized fraction and exponent" do @@ -9,16 +9,16 @@ describe "Math.frexp" do end it "raises a TypeError if the argument cannot be coerced with Float()" do - lambda { Math.frexp("test") }.should raise_error(TypeError) + -> { Math.frexp("test") }.should.raise(TypeError) end it "returns NaN given NaN" do frac, _exp = Math.frexp(nan_value) - frac.nan?.should be_true + frac.nan?.should == true end it "raises a TypeError if the argument is nil" do - lambda { Math.frexp(nil) }.should raise_error(TypeError) + -> { Math.frexp(nil) }.should.raise(TypeError) end it "accepts any argument that can be coerced with Float()" do |
