diff options
author | Xavier Noria <fxn@hashref.com> | 2018-09-10 23:46:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 23:46:51 +0200 |
commit | 621a4e77cf0b245ae740b2ff1bab5e356363ab45 (patch) | |
tree | 5ecdb940b7a23c67bc8201f972114d3c13c9c9de /activesupport/lib/active_support | |
parent | 3e81490717a314437f9123d86fa3e9dc55558e95 (diff) | |
parent | 36e6571a40000a2d7d675384b071c9a009c24499 (diff) | |
download | rails-621a4e77cf0b245ae740b2ff1bab5e356363ab45.tar.gz rails-621a4e77cf0b245ae740b2ff1bab5e356363ab45.tar.bz2 rails-621a4e77cf0b245ae740b2ff1bab5e356363ab45.zip |
Merge pull request #33813 from ryanwhocodes/master
Add #unfreeze_time to ActiveSupport::Testing::TimeHelpers
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/testing/time_helpers.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb index 801ea2909b..decb3179c4 100644 --- a/activesupport/lib/active_support/testing/time_helpers.rb +++ b/activesupport/lib/active_support/testing/time_helpers.rb @@ -158,7 +158,7 @@ module ActiveSupport end # Returns the current time back to its original state, by removing the stubs added by - # +travel+ and +travel_to+. + # +travel+, +travel_to+ and +freeze_time+. # # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 # travel_to Time.zone.local(2004, 11, 24, 01, 04, 44) @@ -168,6 +168,7 @@ module ActiveSupport def travel_back simple_stubs.unstub_all! end + alias_method :unfreeze_time, :travel_back # Calls +travel_to+ with +Time.now+. # |