aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-03-16 21:41:09 +0000
committerMichael Koziarski <michael@koziarski.com>2007-03-16 21:41:09 +0000
commit16b4739e1ef4bc6846c2fd08f81f87eb76b45692 (patch)
tree8855add69ad0ba10aa3668eb299bce66c7133164 /activerecord/test/migration_test.rb
parentc593721e7c5749311c5c8e503c3b248194292d6f (diff)
downloadrails-16b4739e1ef4bc6846c2fd08f81f87eb76b45692.tar.gz
rails-16b4739e1ef4bc6846c2fd08f81f87eb76b45692.tar.bz2
rails-16b4739e1ef4bc6846c2fd08f81f87eb76b45692.zip
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
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r--activerecord/test/migration_test.rb12
1 files 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?