From 16b4739e1ef4bc6846c2fd08f81f87eb76b45692 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 16 Mar 2007 21:41:09 +0000 Subject: [PATCH] Remove special cases for BigDecimal and SQLite, tests pass without them and fail with them. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/migration_test.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index 08b7fc343f..c58a0bed37 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -212,9 +212,7 @@ if ActiveRecord::Base.connection.supports_migrations? # functionality. This allows us to more easily catch INSERT being broken, # but SELECT actually working fine. def test_native_decimal_insert_manual_vs_automatic - # SQLite3 always uses float in violation of SQL - # 16 decimal places - correct_value = (current_adapter?(:SQLiteAdapter) ? '0.123456789012346E20' : '0012345678901234567890.0123456789').to_d + correct_value = '0012345678901234567890.0123456789'.to_d Person.delete_all Person.connection.add_column "people", "wealth", :decimal, :precision => '30', :scale => '10' @@ -280,12 +278,8 @@ if ActiveRecord::Base.connection.supports_migrations? # Test for 30 significent digits (beyond the 16 of float), 10 of them # after the decimal place. - if current_adapter?(:SQLiteAdapter) - # SQLite3 uses float in violation of SQL. Test for 16 decimal places. - assert_equal BigDecimal.new('0.123456789012346E20'), bob.wealth - else - assert_equal BigDecimal.new("0012345678901234567890.0123456789"), bob.wealth - end + + assert_equal BigDecimal.new("0012345678901234567890.0123456789"), bob.wealth assert_equal true, bob.male?