travisjeffery / timecop

A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
MIT License
3.36k stars 223 forks source link

Optional clock gettime 2 #427

Closed joshuacronemeyer closed 2 months ago

joshuacronemeyer commented 2 months ago

based on PR 426. i couldn't figure out how to do this another way.

ElvinEfendi commented 2 months ago

If I'm reading this PR right, it means timecop used to mock Process.clock_gettime by default, but after this PR it no longer mocks it by default. Which is a breaking change as there are tests relying on timecop's previous default behaviour of mocking Process.clock_gettime. However, the change wasn't released as breaking https://github.com/travisjeffery/timecop/pull/428/files.