aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/numeric_ext_test.rb4
-rw-r--r--activesupport/test/time_zone_test.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb
index 35f90aa776..5401ed7c7e 100644
--- a/activesupport/test/core_ext/numeric_ext_test.rb
+++ b/activesupport/test/core_ext/numeric_ext_test.rb
@@ -2,8 +2,8 @@ require 'abstract_unit'
class NumericExtTimeAndDateTimeTest < Test::Unit::TestCase
def setup
- @now = Time.now
- @dtnow = DateTime.now
+ @now = Time.local(2005,2,10,15,30,45)
+ @dtnow = DateTime.civil(2005,2,10,15,30,45)
@seconds = {
1.minute => 60,
10.minutes => 600,
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