summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer/rationalize_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/rationalize_spec.rb')
-rw-r--r--spec/ruby/core/integer/rationalize_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/integer/rationalize_spec.rb b/spec/ruby/core/integer/rationalize_spec.rb
index 1ff4cfa454..272eca6911 100644
--- a/spec/ruby/core/integer/rationalize_spec.rb
+++ b/spec/ruby/core/integer/rationalize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Integer#rationalize" do
before :all do
@@ -12,7 +12,7 @@ describe "Integer#rationalize" do
it "returns a Rational object" do
@numbers.each do |number|
- number.rationalize.should be_an_instance_of(Rational)
+ number.rationalize.should.instance_of?(Rational)
end
end
@@ -33,7 +33,7 @@ describe "Integer#rationalize" do
end
it "raises ArgumentError when passed more than one argument" do
- lambda { 1.rationalize(0.1, 0.1) }.should raise_error(ArgumentError)
- lambda { 1.rationalize(0.1, 0.1, 2) }.should raise_error(ArgumentError)
+ -> { 1.rationalize(0.1, 0.1) }.should.raise(ArgumentError)
+ -> { 1.rationalize(0.1, 0.1, 2) }.should.raise(ArgumentError)
end
end