aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-21 18:00:40 +0100
committerYves Senn <yves.senn@gmail.com>2013-11-21 18:00:40 +0100
commit7ae22cda3f121656439a4fadf12153197fae2036 (patch)
tree0b3ef46114b1b11f52bfa2853ed7d47c4bae96a5 /activesupport/lib
parente2fbec96d4d6a8872ea9f21271e8a24682cd70df (diff)
downloadrails-7ae22cda3f121656439a4fadf12153197fae2036.tar.gz
rails-7ae22cda3f121656439a4fadf12153197fae2036.tar.bz2
rails-7ae22cda3f121656439a4fadf12153197fae2036.zip
doc `travel` and `travel_to` stubs are removed in teardown. [ci skip]
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/testing/time_helpers.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb
index a95ba21ba4..94230e56ba 100644
--- a/activesupport/lib/active_support/testing/time_helpers.rb
+++ b/activesupport/lib/active_support/testing/time_helpers.rb
@@ -3,8 +3,8 @@ module ActiveSupport
# Containing helpers that helps you test passage of time.
module TimeHelpers
# 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+. This method also accepts a block, which will return
- # current time back to its original state at the end of the block.
+ # stubbing +Time.now+ and +Date.today+. Note that the stubs are automatically removed
+ # at the end of each test.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
# travel 1.day
@@ -24,8 +24,8 @@ 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. This method also accepts a block, which will return
- # current time back to its original state at the end of the block.
+ # time or date passed into this method. Note that the stubs are automatically removed
+ # at the end of each test.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
# travel_to Time.new(2004, 11, 24, 01, 04, 44)