aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 17:58:31 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 17:58:31 +0000
commit15467a43f5e0c107d5048950d1718ccccbbaf01e (patch)
tree827eb34d332cf13a97de4bccd118bbcfd88bd521 /activesupport/test/core_ext
parent00326bb0b4682e92759b577f33a842f6be691718 (diff)
downloadrails-15467a43f5e0c107d5048950d1718ccccbbaf01e.tar.gz
rails-15467a43f5e0c107d5048950d1718ccccbbaf01e.tar.bz2
rails-15467a43f5e0c107d5048950d1718ccccbbaf01e.zip
Fix tests across DST (closes #9020) [mpalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7557 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/time_ext_test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb
index 8ab84baa5d..88fd16531e 100644
--- a/activesupport/test/core_ext/time_ext_test.rb
+++ b/activesupport/test/core_ext/time_ext_test.rb
@@ -250,11 +250,13 @@ class TimeExtCalculationsTest < Test::Unit::TestCase
end
def test_next_week
- assert_equal Time.local(2005,2,28), Time.local(2005,2,22,15,15,10).next_week
- assert_equal Time.local(2005,2,29), Time.local(2005,2,22,15,15,10).next_week(:tuesday)
- assert_equal Time.local(2005,3,4), Time.local(2005,2,22,15,15,10).next_week(:friday)
- assert_equal Time.local(2006,10,30), Time.local(2006,10,23,0,0,0).next_week
- assert_equal Time.local(2006,11,1), Time.local(2006,10,23,0,0,0).next_week(:wednesday)
+ with_timezone 'US/Eastern' do
+ assert_equal Time.local(2005,2,28), Time.local(2005,2,22,15,15,10).next_week
+ assert_equal Time.local(2005,2,29), Time.local(2005,2,22,15,15,10).next_week(:tuesday)
+ assert_equal Time.local(2005,3,4), Time.local(2005,2,22,15,15,10).next_week(:friday)
+ assert_equal Time.local(2006,10,30), Time.local(2006,10,23,0,0,0).next_week
+ assert_equal Time.local(2006,11,1), Time.local(2006,10,23,0,0,0).next_week(:wednesday)
+ end
end
def test_next_week_near_daylight_start