rails/rails — pull request #12966 by senny (2013-11-20 13:44:14+00:00)
Title: `end_travel` to remove stubs from `travel` and `travel_to`

This is a follow up to #12824.

This patch introduces a new method called `end_travel` to remove the stubs from `Time.now` and `Date.today`. This is useful to set your tim in `setup` hooks and return to the original state in `teardown`.

To illustrate I updated a test within AR that used some custom stubbing logic.

I'm opening the PR to discuss and find the best name for the method `end_travel`. While brainstorming we thought about `untravel`, `return`, `go_back`, `back` and settled for `end_travel`.