instance method
travel_back
Ruby on Rails 5.2.8.1
Since v4.1.16Signature
travel_back()
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.zone.local(2004, 11, 24, 01, 04, 44) Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 travel_back Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
Source
# File activesupport/lib/active_support/testing/time_helpers.rb, line 169
def travel_back
simple_stubs.unstub_all!
end
Defined in activesupport/lib/active_support/testing/time_helpers.rb line 169
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Testing::TimeHelpers