aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/time_zone_test.rb
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-03-11 07:19:36 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-03-11 07:19:36 +0000
commit5483de0cc345772eb22a461c4509a0bd072863a9 (patch)
treee105e2f0dab30ef35d25fee2ebe287670e4d5241 /activesupport/test/time_zone_test.rb
parent3af5b278397c8162b2ac29bd8eeac1239e4fea15 (diff)
downloadrails-5483de0cc345772eb22a461c4509a0bd072863a9.tar.gz
rails-5483de0cc345772eb22a461c4509a0bd072863a9.tar.bz2
rails-5483de0cc345772eb22a461c4509a0bd072863a9.zip
Fix Numeric time tests broken by DST change by anchoring them to fixed times instead of Time.now. Anchor TimeZone#now DST test to time specified with Time.at instead of Time.local to work around platform differences with Time.local and DST representation
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/time_zone_test.rb')
-rw-r--r--activesupport/test/time_zone_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index de06482af6..3ae88db9dd 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -83,9 +83,9 @@ class TimeZoneTest < Test::Unit::TestCase
def test_now_enforces_fall_dst_rules
with_env_tz 'US/Eastern' do
- Time.stubs(:now).returns(Time.local(2006,10,29,1)) # 1AM is ambiguous; could be DST or non-DST 1AM
+ Time.stubs(:now).returns(Time.at(1162098000)) # equivalent to 1AM DST
zone = TimeZone['Eastern Time (US & Canada)']
- assert_equal Time.utc(2006,10,29,1), zone.now.time # selects DST 1AM
+ assert_equal Time.utc(2006,10,29,1), zone.now.time
assert_equal true, zone.now.dst?
end
end