Test only with Ruby 1.9+

This commit is contained in:
Rafael Mendonça França
2013-01-06 20:30:10 -03:00
parent 79456619cf
commit 80343f6f90

View File

@@ -57,10 +57,12 @@ module ActiveRecord
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