aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/date_ext_test.rb
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-01-26 00:11:59 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-01-26 00:11:59 +0000
commitc95365a00eb086f61cb5e73e9e6d5dae54325b60 (patch)
tree58bfbe47218789c7d025fe57873c1458053e52fe /activesupport/test/core_ext/date_ext_test.rb
parentdad3e835f77d402aad3b0802ee14bf7a20fd9365 (diff)
downloadrails-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_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/date_ext_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb
index 483841a129..cd74be8321 100644
--- a/activesupport/test/core_ext/date_ext_test.rb
+++ b/activesupport/test/core_ext/date_ext_test.rb
@@ -175,7 +175,7 @@ class DateExtCalculationsTest < Test::Unit::TestCase
end
def test_xmlschema
- with_timezone 'US/Eastern' do
+ with_env_tz 'US/Eastern' do
assert_match(/^1980-02-28T00:00:00-05:?00$/, Date.new(1980, 2, 28).xmlschema)
assert_match(/^1980-06-28T00:00:00-04:?00$/, Date.new(1980, 6, 28).xmlschema)
# these tests are only of interest on platforms where older dates #to_time fail over to DateTime
@@ -187,7 +187,7 @@ class DateExtCalculationsTest < 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