diff options
Diffstat (limited to 'spec/ruby/core/math/cbrt_spec.rb')
| -rw-r--r-- | spec/ruby/core/math/cbrt_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/math/cbrt_spec.rb b/spec/ruby/core/math/cbrt_spec.rb index 0b608151ab..4e2383043b 100644 --- a/spec/ruby/core/math/cbrt_spec.rb +++ b/spec/ruby/core/math/cbrt_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.cbrt" do it "returns a float" do - Math.cbrt(1).should be_an_instance_of(Float) + Math.cbrt(1).should.instance_of?(Float) end it "returns the cubic root of the argument" do @@ -14,11 +14,11 @@ describe "Math.cbrt" do end it "raises a TypeError if the argument cannot be coerced with Float()" do - lambda { Math.cbrt("foobar") }.should raise_error(TypeError) + -> { Math.cbrt("foobar") }.should.raise(TypeError) end it "raises a TypeError if the argument is nil" do - lambda { Math.cbrt(nil) }.should raise_error(TypeError) + -> { Math.cbrt(nil) }.should.raise(TypeError) end it "accepts any argument that can be coerced with Float()" do |
