Skip to content
Browse files

doc `travel` and `travel_to` stubs are removed in teardown. [ci skip]

  • Loading branch information...
1 parent e2fbec9 commit 7ae22cda3f121656439a4fadf12153197fae2036 @senny senny committed Nov 21, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/lib/active_support/testing/time_helpers.rb
View
8 activesupport/lib/active_support/testing/time_helpers.rb
@@ -3,8 +3,8 @@ module Testing
# 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 @@ def travel(duration, &block)
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)

0 comments on commit 7ae22cd

Please sign in to comment.
Something went wrong with that request. Please try again.