From c95365a00eb086f61cb5e73e9e6d5dae54325b60 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Sat, 26 Jan 2008 00:11:59 +0000 Subject: 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 --- activesupport/test/core_ext/date_ext_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/test/core_ext/date_ext_test.rb') 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 -- cgit v1.2.3