diff options
Diffstat (limited to 'spec/ruby/core/math/erf_spec.rb')
| -rw-r--r-- | spec/ruby/core/math/erf_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/math/erf_spec.rb b/spec/ruby/core/math/erf_spec.rb index 1ea5693dfe..5384e73ae9 100644 --- a/spec/ruby/core/math/erf_spec.rb +++ b/spec/ruby/core/math/erf_spec.rb @@ -1,11 +1,11 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/classes' # erf method is the "error function" encountered in integrating the normal # distribution (which is a normalized form of the Gaussian function). describe "Math.erf" do it "returns a float" do - Math.erf(1).should be_kind_of(Float) + Math.erf(1).should.is_a?(Float) end it "returns the error function of the argument" do @@ -21,15 +21,15 @@ describe "Math.erf" do end it "raises a TypeError if the argument cannot be coerced with Float()" do - lambda { Math.erf("test") }.should raise_error(TypeError) + -> { Math.erf("test") }.should.raise(TypeError) end it "returns NaN given NaN" do - Math.erf(nan_value).nan?.should be_true + Math.erf(nan_value).nan?.should == true end it "raises a TypeError if the argument is nil" do - lambda { Math.erf(nil) }.should raise_error(TypeError) + -> { Math.erf(nil) }.should.raise(TypeError) end it "accepts any argument that can be coerced with Float()" do |
