Timecop vs Rails TimeHelpers
01-Apr-2021 1436
Timecop is the go-to gem for testing time-dependent code, as it allows you to manipulate the current time during test runs. This is important because without control over the time, flakey tests can emerge in your codebase.A very simple example is testing the created_at attribute of an ActiveRecord model:.
Timecop vs Rails TimeHelpers #ruby #rubydeveloper #rubyonrails #Timecop #Rails #TimeHelpers https://rubyonrails.ba/link/timecop-vs-rails-timehelpers