aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-05-18 01:14:18 +0000
committerMichael Koziarski <michael@koziarski.com>2007-05-18 01:14:18 +0000
commit45a79034e413f81c4b2175d3e20ed65f9725f95b (patch)
tree219e55064f272d26a4f2a54101b4ebcdb4149861 /activerecord/test/migration_test.rb
parentebbe4fb0d41feb45628715cd045d89e7bb8ab117 (diff)
downloadrails-45a79034e413f81c4b2175d3e20ed65f9725f95b.tar.gz
rails-45a79034e413f81c4b2175d3e20ed65f9725f95b.tar.bz2
rails-45a79034e413f81c4b2175d3e20ed65f9725f95b.zip
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
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r--activerecord/test/migration_test.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb
index c58a0bed37..eacff078ee 100644
--- a/activerecord/test/migration_test.rb
+++ b/activerecord/test/migration_test.rb
@@ -230,7 +230,9 @@ if ActiveRecord::Base.connection.supports_migrations?
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 @@ if ActiveRecord::Base.connection.supports_migrations?
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 @@ if ActiveRecord::Base.connection.supports_migrations?
# 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