aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
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/lib/active_support
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/lib/active_support')
-rw-r--r--activesupport/lib/active_support/testing/time_helpers.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb
index b183b8d8ef..4c6bca5ada 100644
--- a/activesupport/lib/active_support/testing/time_helpers.rb
+++ b/activesupport/lib/active_support/testing/time_helpers.rb
@@ -41,14 +41,8 @@ module ActiveSupport
# Containing helpers that helps you test passage of time.
module TimeHelpers
- def after_teardown #:nodoc:
- travel_back
- super
- end
-
# Change current time to the time in the future or in the past by a given time difference by
- # stubbing +Time.now+ and +Date.today+. Note that the stubs are automatically removed
- # at the end of each test.
+ # stubbing +Time.now+ and +Date.today+.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
# travel 1.day
@@ -68,8 +62,7 @@ module ActiveSupport
end
# Change current time to the given time by stubbing +Time.now+ and +Date.today+ to return the
- # time or date passed into this method. Note that the stubs are automatically removed
- # at the end of each test.
+ # time or date passed into this method.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
# travel_to Time.new(2004, 11, 24, 01, 04, 44)