Should we remove timecop?
Opened this issue · 2 comments
mnmallea commented
Rails already have helpers to time travel on specs without using a gem.
See https://api.rubyonrails.org/v5.2.4.1/classes/ActiveSupport/Testing/TimeHelpers.html. Why not to include this module on tests classes?
lucasVoboril commented
Sure! we need to update the spec helper with something like
RSpec.configure do |config|
config.include ActiveSupport::Testing::TimeHelpers
config.after(:each) do
DatabaseCleaner.clean
# Timecop.return Delete this line
travel_back
end
end
And delete TimeCop from gemfile 👼
mnmallea commented
Should before_each include a freeze_time
?