Skip to content

Commit

Permalink
Removed timecop in favor of travel_to (#351)
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 authored Sep 29, 2023
1 parent 813fc9e commit 55cb5c2
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 55cb5c2

Please sign in to comment.