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

Ruby 2.5 seems to work? #383

Closed mick-t closed 2 years ago

mick-t commented 2 years ago

Hi,

I was trying to duplicate the issue you were seeing with Ruby 2.5 mentioned in #375) to see if I could fix them as I work on a project that still uses 2.5.

My tests with a recent clone look to have succeeded:

I found this recent test of yours and I can't seem to duplicate it:

Maybe the issue with 2.5 was transient?

Thanks --Mick

joshuacronemeyer commented 2 years ago

Happy to add it back if it works. How about a PR?

mick-t commented 2 years ago

Done:

https://github.com/travisjeffery/timecop/pull/384

Thanks!

joshuacronemeyer commented 2 years ago

@mick-t you are our ruby 2.5 champion. Have a look https://github.com/travisjeffery/timecop/actions/runs/2643024207

mick-t commented 2 years ago

The tests succeed in my fork:

I did a pull from your master branch and rebuild. I'm not sure why the difference. Your source branch starts shows this error:

Failed to load /home/runner/.gemrc, wrong number of arguments (given 2, expected 1)

I'm unsure as why? Will dig into it more later.