Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed ruby_version_is from NilClass specs.

  • Loading branch information...
commit b21ad06d84e8c4c9a3a8036694711138f78fe54c 1 parent 3256144
@brixen brixen authored
View
22 core/nil/rationalize_spec.rb
@@ -1,18 +1,16 @@
require File.expand_path('../../../spec_helper', __FILE__)
-ruby_version_is "1.9" do
- describe "NilClass#rationalize" do
- it "returns 0/1" do
- nil.rationalize.should == Rational(0, 1)
- end
+describe "NilClass#rationalize" do
+ it "returns 0/1" do
+ nil.rationalize.should == Rational(0, 1)
+ end
- it "ignores a single argument" do
- nil.rationalize(0.1).should == Rational(0, 1)
- end
+ it "ignores a single argument" do
+ nil.rationalize(0.1).should == Rational(0, 1)
+ end
- it "raises ArgumentError when passed more than one argument" do
- lambda { nil.rationalize(0.1, 0.1) }.should raise_error(ArgumentError)
- lambda { nil.rationalize(0.1, 0.1, 2) }.should raise_error(ArgumentError)
- end
+ it "raises ArgumentError when passed more than one argument" do
+ lambda { nil.rationalize(0.1, 0.1) }.should raise_error(ArgumentError)
+ lambda { nil.rationalize(0.1, 0.1, 2) }.should raise_error(ArgumentError)
end
end
View
8 core/nil/to_c_spec.rb
@@ -1,9 +1,7 @@
require File.expand_path('../../../spec_helper', __FILE__)
-ruby_version_is "1.9" do
- describe "NilClass#to_c" do
- it "returns Complex(0, 0)" do
- nil.to_c.should eql(Complex(0, 0))
- end
+describe "NilClass#to_c" do
+ it "returns Complex(0, 0)" do
+ nil.to_c.should eql(Complex(0, 0))
end
end
View
10 core/nil/to_h_spec.rb
@@ -1,10 +1,8 @@
require File.expand_path('../../../spec_helper', __FILE__)
-ruby_version_is "2.0" do
- describe "NilClass#to_h" do
- it "returns an empty hash" do
- nil.to_h.should == {}
- nil.to_h.default.should == nil
- end
+describe "NilClass#to_h" do
+ it "returns an empty hash" do
+ nil.to_h.should == {}
+ nil.to_h.default.should == nil
end
end
View
8 core/nil/to_r_spec.rb
@@ -1,9 +1,7 @@
require File.expand_path('../../../spec_helper', __FILE__)
-ruby_version_is "1.9" do
- describe "NilClass#to_r" do
- it "returns 0/1" do
- nil.to_r.should == Rational(0, 1)
- end
+describe "NilClass#to_r" do
+ it "returns 0/1" do
+ nil.to_r.should == Rational(0, 1)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.