提交 45a79034 编写于 作者: M Michael Koziarski

Ensure that the BigDecimal assertions aren't run for sqlite3, which doesn't...

Ensure that the BigDecimal assertions aren't run for sqlite3, which doesn't support the precision correctly

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 ebbe4fb0
......@@ -230,7 +230,9 @@ def test_native_decimal_insert_manual_vs_automatic
assert_kind_of BigDecimal, row.wealth
# If this assert fails, that means the SELECT is broken!
assert_equal correct_value, row.wealth
unless current_adapter?(:SQLite3Adapter)
assert_equal correct_value, row.wealth
end
# Reset to old state
Person.delete_all
......@@ -243,7 +245,9 @@ def test_native_decimal_insert_manual_vs_automatic
assert_kind_of BigDecimal, row.wealth
# If these asserts fail, that means the INSERT (create function, or cast to SQL) is broken!
assert_equal correct_value, row.wealth
unless current_adapter?(:SQLite3Adapter)
assert_equal correct_value, row.wealth
end
# Reset to old state
Person.connection.del_column "people", "wealth" rescue nil
......@@ -279,8 +283,10 @@ def test_native_types
# Test for 30 significent digits (beyond the 16 of float), 10 of them
# after the decimal place.
assert_equal BigDecimal.new("0012345678901234567890.0123456789"), bob.wealth
unless current_adapter?(:SQLite3Adapter)
assert_equal BigDecimal.new("0012345678901234567890.0123456789"), bob.wealth
end
assert_equal true, bob.male?
assert_equal String, bob.first_name.class
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册