Replace Timecop With Rails’ Time Helpers in RSpec

Time-sensitive tests can be a pain.Thankfully, for many years the timecop gem served as a way to “freeze” time and “time travel” during tests, so that any time that elapsed during the running of your tests did not affect the results.It’s such a good idea that Rails built very similar functionality into Active Support, released in Rails 4.1.
Replace Timecop With Rails’ Time Helpers in RSpec #ruby #rubydeveloper #rubyonrails #rspec https://rubyonrails.ba/single/replace-timecop-with-rails-time-helpers-in-rspec

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles