From c08547d2266c75f0a82d06dd91c6d0500740e12e Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 3 Jun 2008 13:32:53 -0500 Subject: Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [#238 state:resolved] --- activesupport/test/core_ext/duration_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activesupport/test/core_ext/duration_test.rb') diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index 7b17fe71db..f802ed8760 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -29,7 +29,7 @@ class DurationTest < Test::Unit::TestCase flunk("ArgumentError should be raised, but we got #{$!.class} instead") end end - + uses_mocha 'TestDurationSinceAndAgoWithCurrentTime' do def test_since_and_ago_anchored_to_time_now_when_time_zone_default_not_set Time.zone_default = nil @@ -43,10 +43,10 @@ class DurationTest < Test::Unit::TestCase assert_equal Time.local(1999,12,31,23,59,55), 5.seconds.ago end end - + def test_since_and_ago_anchored_to_time_zone_now_when_time_zone_default_set silence_warnings do # silence warnings raised by tzinfo gem - Time.zone_default = TimeZone['Eastern Time (US & Canada)'] + Time.zone_default = ActiveSupport::TimeZone['Eastern Time (US & Canada)'] with_env_tz 'US/Eastern' do Time.stubs(:now).returns Time.local(2000) # since @@ -63,7 +63,7 @@ class DurationTest < Test::Unit::TestCase Time.zone_default = nil end end - + protected def with_env_tz(new_tz = 'US/Eastern') old_tz, ENV['TZ'] = ENV['TZ'], new_tz -- cgit v1.2.3