aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/time_zone_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-29 22:41:30 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-30 10:17:48 -0200
commit7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3 (patch)
tree81baf07d5fe1ec652a6b4de25dbe95da38b432da /activesupport/test/time_zone_test.rb
parent6b16c2788186d45c70bd1d9fc476407e3e265439 (diff)
downloadrails-7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3.tar.gz
rails-7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3.tar.bz2
rails-7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3.zip
Remove automatic removal of Date/Time stubs after each test case
This behavior is only work out-of-box with minitest and also add a downside to run after each test case, even if we don't used the travel or travel_to methods
Diffstat (limited to 'activesupport/test/time_zone_test.rb')
-rw-r--r--activesupport/test/time_zone_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 1107b48460..cd79efbe8c 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -97,6 +97,7 @@ class TimeZoneTest < ActiveSupport::TestCase
assert_equal Date.new(2000, 1, 1), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].today
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
+ travel_back
end
def test_tomorrow
@@ -108,6 +109,7 @@ class TimeZoneTest < ActiveSupport::TestCase
assert_equal Date.new(2000, 1, 2), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].tomorrow
travel_to(Time.utc(2000, 1, 2, 5)) # midnight Jan 2 EST
assert_equal Date.new(2000, 1, 3), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].tomorrow
+ travel_back
end
def test_yesterday
@@ -119,6 +121,7 @@ class TimeZoneTest < ActiveSupport::TestCase
assert_equal Date.new(1999, 12, 31), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].yesterday
travel_to(Time.utc(2000, 1, 2, 5)) # midnight Jan 2 EST
assert_equal Date.new(2000, 1, 1), ActiveSupport::TimeZone['Eastern Time (US & Canada)'].yesterday
+ travel_back
end
def test_local