diff options
author | Colin Bartlett <colin@colinabartlett.com> | 2013-12-03 10:36:33 -0500 |
---|---|---|
committer | Colin Bartlett <colin@colinabartlett.com> | 2013-12-03 10:37:01 -0500 |
commit | 59cb9e31fd9a2671697fb8d4b652b7a1b2a02a32 (patch) | |
tree | c8e6592bea51de057ef526edc86af93c0b83258f /activesupport/test | |
parent | a04b5ee4163e5ff6b8afab37c0b5dc6fd06a676b (diff) | |
download | rails-59cb9e31fd9a2671697fb8d4b652b7a1b2a02a32.tar.gz rails-59cb9e31fd9a2671697fb8d4b652b7a1b2a02a32.tar.bz2 rails-59cb9e31fd9a2671697fb8d4b652b7a1b2a02a32.zip |
Use travel_to convention in existing test
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/time_zone_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 84c3154e53..116a31242c 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -89,13 +89,13 @@ class TimeZoneTest < ActiveSupport::TestCase end def test_today - Time.stubs(:now).returns(Time.utc(2000, 1, 1, 4, 59, 59)) # 1 sec before midnight Jan 1 EST + travel_to(Time.utc(2000, 1, 1, 4, 59, 59)) # 1 sec before midnight Jan 1 EST assert_equal Date.new(1999, 12, 31), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].today - Time.stubs(:now).returns(Time.utc(2000, 1, 1, 5)) # midnight Jan 1 EST + travel_to(Time.utc(2000, 1, 1, 5)) # midnight Jan 1 EST assert_equal Date.new(2000, 1, 1), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].today - Time.stubs(:now).returns(Time.utc(2000, 1, 2, 4, 59, 59)) # 1 sec before midnight Jan 2 EST + travel_to(Time.utc(2000, 1, 2, 4, 59, 59)) # 1 sec before midnight Jan 2 EST assert_equal Date.new(2000, 1, 1), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].today - Time.stubs(:now).returns(Time.utc(2000, 1, 2, 5)) # midnight Jan 2 EST + travel_to(Time.utc(2000, 1, 2, 5)) # midnight Jan 2 EST assert_equal Date.new(2000, 1, 2), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].today end |