Skip to content

Commit

Permalink
Removed timecop in favor of travel_to
Browse files Browse the repository at this point in the history
With the release of `rails` 4.1, `Timecop.freeze` can be replaced with
`travel_to`

```ruby
Timecop.freeze 1.week.ago do
  # time sensitive code
end

travel_to 1.week.ago do
  # time sensitive code
end
```

Read more in the
[TimeHelpers](https://github.com/rails/rails/blob/a6f55fe257512731d7f3f41976648d99e9ec95be/activesupport/lib/active_support/testing/time_helpers.rb#L43)
module.
  • Loading branch information
seanpdoyle committed Sep 29, 2023
1 parent 17f6d5d commit 229424e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ And testing gems like:
* [RSpec Mocks](https://github.com/rspec/rspec-mocks) for stubbing and spying
* [Shoulda Matchers](https://github.com/thoughtbot/shoulda-matchers) for common
RSpec matchers
* [Timecop](https://github.com/travisjeffery/timecop) for testing time

## Other goodies

Expand Down
1 change: 0 additions & 1 deletion templates/Gemfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ end
group :test do
gem "formulaic"
gem "launchy"
gem "timecop"
gem "webmock"
end

Expand Down

0 comments on commit 229424e

Please sign in to comment.