Skip to content
Browse files

Test only with Ruby 1.9+

  • Loading branch information...
1 parent 7945661 commit 80343f6f9017d2e5f11c4fd5776e3f501a126bb1 @rafaelfranca rafaelfranca committed Jan 6, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 activerecord/test/cases/column_test.rb
View
10 activerecord/test/cases/column_test.rb
@@ -57,10 +57,12 @@ def test_type_cast_object_without_to_i_to_integer
assert_nil column.type_cast(Object.new)
end
- def test_type_cast_nan_and_infinity_to_integer
- column = Column.new("field", nil, "integer")
- assert_nil column.type_cast(Float::NAN)
- assert_nil column.type_cast(1.0/0.0)
+ if RUBY_VERSION > '1.9'
+ def test_type_cast_nan_and_infinity_to_integer
+ column = Column.new("field", nil, "integer")
+ assert_nil column.type_cast(Float::NAN)
+ assert_nil column.type_cast(1.0/0.0)
+ end
end
end
end

0 comments on commit 80343f6

Please sign in to comment.
Something went wrong with that request. Please try again.