Created
November 28, 2017 17:55
-
-
Save thehenster/a1d4c7389ece55917ad492d5ac415d74 to your computer and use it in GitHub Desktop.
Time travel in console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1] pry(main)> require "active_support/testing/time_helpers" | |
=> true | |
[2] pry(main)> include ActiveSupport::Testing::TimeHelpers | |
=> Object | |
[3] pry(main)> travel_to("1969-01-01".to_time){ puts Time.current } | |
1969-01-01 00:00:00 +0100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment