Closed mvalipour closed 1 year ago
☝️ I'm happy to PR this if there is a consensus.
I agree, the timezone issue #124 make this really difficult to debug.
I would prefer a comparison using .to_f
instead (which is probably the same as direct comparison?)
I think it should work with .utc
https://github.com/philostler/rspec-sidekiq/pull/146
Believe this was fixed with https://github.com/wspurgin/rspec-sidekiq/commit/dcc6d037a2333a5af73ead81809b484fd0e9ac13 though it's not a direct comparison as a to_int
is used to avoid fractional second mismatches.
This is more of a question, but it's something that has come to huge confusion for me.
In here: https://github.com/philostler/rspec-sidekiq/blob/develop/lib/rspec/sidekiq/matchers/have_enqueued_job.rb#L29
Is there any reason why this isn't using a simple comparison?
value.to_time == Time.at(job['at'])
.I tend to have a lot of issues/confusion when
value
is in a different time zone.