Changeset 9009
- Timestamp:
- 03/11/08 07:19:36 (6 months ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/test/core_ext/numeric_ext_test.rb (modified) (1 diff)
- trunk/activesupport/test/time_zone_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r9008 r9009 1 1 *SVN* 2 3 * 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 [Geoff Buesing] 2 4 3 5 * Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZone [Geoff Buesing] trunk/activesupport/test/core_ext/numeric_ext_test.rb
r8635 r9009 3 3 class NumericExtTimeAndDateTimeTest < Test::Unit::TestCase 4 4 def setup 5 @now = Time. now6 @dtnow = DateTime. now5 @now = Time.local(2005,2,10,15,30,45) 6 @dtnow = DateTime.civil(2005,2,10,15,30,45) 7 7 @seconds = { 8 8 1.minute => 60, trunk/activesupport/test/time_zone_test.rb
r9007 r9009 84 84 def test_now_enforces_fall_dst_rules 85 85 with_env_tz 'US/Eastern' do 86 Time.stubs(:now).returns(Time. local(2006,10,29,1)) # 1AM is ambiguous; could be DST or non-DST 1AM86 Time.stubs(:now).returns(Time.at(1162098000)) # equivalent to 1AM DST 87 87 zone = TimeZone['Eastern Time (US & Canada)'] 88 assert_equal Time.utc(2006,10,29,1), zone.now.time # selects DST 1AM88 assert_equal Time.utc(2006,10,29,1), zone.now.time 89 89 assert_equal true, zone.now.dst? 90 90 end