Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix failing tests on mysql 4.1 & ruby 1.8.4. [#237 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
commit cff2291df5d1df106ae8cf116655f0703f53f8c3 1 parent c2036ad
Frederick Cheung fcheung authored lifo committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/migration_test.rb
4 activerecord/test/cases/migration_test.rb
View
@@ -281,7 +281,7 @@ def test_native_decimal_insert_manual_vs_automatic
# Do a manual insertion
if current_adapter?(:OracleAdapter)
Person.connection.execute "insert into people (id, wealth) values (people_seq.nextval, 12345678901234567890.0123456789)"
- elsif current_adapter?(:OpenBaseAdapter)
+ elsif current_adapter?(:OpenBaseAdapter) || (current_adapter?(:MysqlAdapter) && Mysql.client_version < 50003) #before mysql 5.0.3 decimals stored as strings
Person.connection.execute "insert into people (wealth) values ('12345678901234567890.0123456789')"
else
Person.connection.execute "insert into people (wealth) values (12345678901234567890.0123456789)"
@@ -384,7 +384,7 @@ def test_native_types
assert_not_equal "Z", bob.moment_of_truth.zone
# US/Eastern is -5 hours from GMT
assert_equal Rational(-5, 24), bob.moment_of_truth.offset
- assert_equal "-05:00", bob.moment_of_truth.zone
+ assert_match /\A-05:?00\Z/, bob.moment_of_truth.zone #ruby 1.8.6 uses HH:MM, prior versions use HHMM
assert_equal DateTime::ITALY, bob.moment_of_truth.start
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.