Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix tests across DST (closes #9020) [mpalmer]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7557 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 15467a43f5e0c107d5048950d1718ccccbbaf01e 1 parent 00326bb
David Heinemeier Hansson dhh authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 activesupport/test/core_ext/time_ext_test.rb
12 activesupport/test/core_ext/time_ext_test.rb
View
@@ -250,11 +250,13 @@ def test_utc_plus
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
Please sign in to comment.
Something went wrong with that request. Please try again.