diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2008-01-26 00:11:59 +0000 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2008-01-26 00:11:59 +0000 |
commit | c95365a00eb086f61cb5e73e9e6d5dae54325b60 (patch) | |
tree | 58bfbe47218789c7d025fe57873c1458053e52fe /activesupport/test/core_ext/date_time_ext_test.rb | |
parent | dad3e835f77d402aad3b0802ee14bf7a20fd9365 (diff) | |
download | rails-c95365a00eb086f61cb5e73e9e6d5dae54325b60.tar.gz rails-c95365a00eb086f61cb5e73e9e6d5dae54325b60.tar.bz2 rails-c95365a00eb086f61cb5e73e9e6d5dae54325b60.zip |
with_timezone test helper renamed with_env_tz, to distinguish between setting ENV['TZ'] and setting Time.zone in tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext/date_time_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/date_time_ext_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb index 97d478eee3..cb9b6530c9 100644 --- a/activesupport/test/core_ext/date_time_ext_test.rb +++ b/activesupport/test/core_ext/date_time_ext_test.rb @@ -212,10 +212,10 @@ class DateTimeExtCalculationsTest < Test::Unit::TestCase end def test_local_offset - with_timezone 'US/Eastern' do + with_env_tz 'US/Eastern' do assert_equal Rational(-5, 24), DateTime.local_offset end - with_timezone 'US/Central' do + with_env_tz 'US/Central' do assert_equal Rational(-6, 24), DateTime.local_offset end end @@ -273,7 +273,7 @@ class DateTimeExtCalculationsTest < Test::Unit::TestCase end protected - def with_timezone(new_tz = 'US/Eastern') + def with_env_tz(new_tz = 'US/Eastern') old_tz, ENV['TZ'] = ENV['TZ'], new_tz yield ensure |