aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-06-16 09:59:59 -0700
committerCarl Lerche <carllerche@mac.com>2010-06-16 10:09:59 -0700
commit8e56085817e752bb361738ec6ca7362a3398ed77 (patch)
treefa5e4e474e2c9aed05f486fdd3a971f4e858a37d /activerecord/test/cases/migration_test.rb
parent07c6b7a6ad70fd021516d413caa5c3ac914933ac (diff)
downloadrails-8e56085817e752bb361738ec6ca7362a3398ed77.tar.gz
rails-8e56085817e752bb361738ec6ca7362a3398ed77.tar.bz2
rails-8e56085817e752bb361738ec6ca7362a3398ed77.zip
use assert_in_delta() for floating point comparisons in tests [#4871 state:resolved]
Signed-off-by: Carl Lerche <carllerche@mac.com>
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index ddadde8dcf..6fe3b01281 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -1032,7 +1032,7 @@ if ActiveRecord::Base.connection.supports_migrations?
elsif current_adapter?(:SQLiteAdapter)
# - SQLite3 stores a float, in violation of SQL
assert_kind_of BigDecimal, b.value_of_e
- assert_equal BigDecimal("2.71828182845905"), b.value_of_e
+ assert_in_delta BigDecimal("2.71828182845905"), b.value_of_e, 0.00000000000001
else
# - SQL standard is an integer
assert_kind_of Fixnum, b.value_of_e