aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/time_helpers.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-30 10:13:58 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-30 10:17:48 -0200
commitfa1f20e6549f962112948f5b3c27d09ab5e5faaf (patch)
treec36d39f66c220c8041ddd72efff3264275adf4b5 /activesupport/lib/active_support/testing/time_helpers.rb
parent7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3 (diff)
downloadrails-fa1f20e6549f962112948f5b3c27d09ab5e5faaf.tar.gz
rails-fa1f20e6549f962112948f5b3c27d09ab5e5faaf.tar.bz2
rails-fa1f20e6549f962112948f5b3c27d09ab5e5faaf.zip
Improve documentation [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/testing/time_helpers.rb')
-rw-r--r--activesupport/lib/active_support/testing/time_helpers.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb
index 4c6bca5ada..9e0a3d6345 100644
--- a/activesupport/lib/active_support/testing/time_helpers.rb
+++ b/activesupport/lib/active_support/testing/time_helpers.rb
@@ -41,7 +41,7 @@ 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
+ # Changes current time to the time in the future or in the past by a given time difference by
# stubbing +Time.now+ and +Date.today+.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
@@ -61,7 +61,7 @@ module ActiveSupport
travel_to Time.now + duration, &block
end
- # Change current time to the given time by stubbing +Time.now+ and +Date.today+ to return the
+ # Changes current time to the given time by stubbing +Time.now+ and +Date.today+ to return the
# time or date passed into this method.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
@@ -87,7 +87,8 @@ module ActiveSupport
end
end
- # Return the current time back to its original state.
+ # Returns the current time back to its original state, by removing the stubs added by
+ # `travel` and `travel_to`.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
# travel_to Time.new(2004, 11, 24, 01, 04, 44)