aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-03-10 06:48:15 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-03-10 06:48:15 +0000
commit8e21ec36cf110793d56fe281995939efd3533e34 (patch)
tree51922f1119bd3d09da4faaab0ef66c064c1c9f34 /activerecord/test/cases
parentf56c25d7b44d4ac4936a39bbcad53614daea162a (diff)
downloadrails-8e21ec36cf110793d56fe281995939efd3533e34.tar.gz
rails-8e21ec36cf110793d56fe281995939efd3533e34.tar.bz2
rails-8e21ec36cf110793d56fe281995939efd3533e34.zip
test_native_types expects DateTime.local_offset instead of DateTime.now.offset; fixes test breakage due to dst transition
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases')
-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 32d7dbe3c4..5dbfbd81c2 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -330,7 +330,7 @@ if ActiveRecord::Base.connection.supports_migrations?
# Test DateTime column and defaults, including timezone.
# FIXME: moment of truth may be Time on 64-bit platforms.
if bob.moment_of_truth.is_a?(DateTime)
- assert_equal DateTime.now.offset, bob.moment_of_truth.offset
+ assert_equal DateTime.local_offset, bob.moment_of_truth.offset
assert_not_equal 0, bob.moment_of_truth.offset
assert_not_equal "Z", bob.moment_of_truth.zone
assert_equal DateTime::ITALY, bob.moment_of_truth.start