aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-03-16 08:25:37 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-03-16 08:25:37 +0000
commitdb69c9c12a4b24f6ca8bc186851cc3873303584c (patch)
tree94119383edbd491122c49e1aba87ad2cfe58744d /activerecord/test/migration_test.rb
parent814dd007e51f34299b767528f5dfc36cb4b69be3 (diff)
downloadrails-db69c9c12a4b24f6ca8bc186851cc3873303584c.tar.gz
rails-db69c9c12a4b24f6ca8bc186851cc3873303584c.tar.bz2
rails-db69c9c12a4b24f6ca8bc186851cc3873303584c.zip
PostgreSQL: remove DateTime -> Time downcast. Bypass the DateTime migration test on 64-bit platforms since it may be a Time.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r--activerecord/test/migration_test.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb
index f5b13f6c99..edbea9aa78 100644
--- a/activerecord/test/migration_test.rb
+++ b/activerecord/test/migration_test.rb
@@ -303,10 +303,12 @@ if ActiveRecord::Base.connection.supports_migrations?
end
# Test DateTime column and defaults, including timezone.
- assert_equal DateTime, bob.moment_of_truth.class
- assert_equal DateTime.now.offset, bob.moment_of_truth.offset
- assert_not_equal 0, bob.moment_of_truth.offset
- assert_not_equal "Z", bob.moment_of_truth.zone
+ # FIXME: momemnt of truth is Time on 64-bit platforms.
+ if bob.moment_of_truth.is_a?(DateTime)
+ assert_equal DateTime.now.offset, bob.moment_of_truth.offset
+ assert_not_equal 0, bob.moment_of_truth.offset
+ assert_not_equal "Z", bob.moment_of_truth.zone
+ end
assert_equal TrueClass, bob.male?.class
assert_kind_of BigDecimal, bob.wealth