public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Fix failing tests on mysql 4.1 & ruby 1.8.4. [#237 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
fcheung (author)
Thu May 22 03:19:10 -0700 2008
lifo (committer)
Thu May 22 04:13:11 -0700 2008
commit  cff2291df5d1df106ae8cf116655f0703f53f8c3
tree    5921ee714a5df59fc5c1bed2ebd55ed9de84250c
parent  c2036adf7658f56c924e2a206731ee63b628f34f
...
281
282
283
284
 
285
286
287
...
384
385
386
387
 
388
389
390
...
281
282
283
 
284
285
286
287
...
384
385
386
 
387
388
389
390
0
@@ -281,7 +281,7 @@ if ActiveRecord::Base.connection.supports_migrations?
0
       # Do a manual insertion
0
       if current_adapter?(:OracleAdapter)
0
         Person.connection.execute "insert into people (id, wealth) values (people_seq.nextval, 12345678901234567890.0123456789)"
0
- elsif current_adapter?(:OpenBaseAdapter)
0
+ elsif current_adapter?(:OpenBaseAdapter) || (current_adapter?(:MysqlAdapter) && Mysql.client_version < 50003) #before mysql 5.0.3 decimals stored as strings
0
         Person.connection.execute "insert into people (wealth) values ('12345678901234567890.0123456789')"
0
       else
0
         Person.connection.execute "insert into people (wealth) values (12345678901234567890.0123456789)"
0
@@ -384,7 +384,7 @@ if ActiveRecord::Base.connection.supports_migrations?
0
           assert_not_equal "Z", bob.moment_of_truth.zone
0
           # US/Eastern is -5 hours from GMT
0
           assert_equal Rational(-5, 24), bob.moment_of_truth.offset
0
- assert_equal "-05:00", bob.moment_of_truth.zone
0
+ assert_match /\A-05:?00\Z/, bob.moment_of_truth.zone #ruby 1.8.6 uses HH:MM, prior versions use HHMM
0
           assert_equal DateTime::ITALY, bob.moment_of_truth.start
0
         end
0
       end

Comments

    No one has commented yet.