Simplify the Job options matcher to just expect at since that's what will be on the Sidekiq Job. We move the parsing/handling of expected values for at versus in to the methods in HaveEnqueuedJob
Also updates the description on mismatch to show an "at" expectation when using in as the actual Sidekiq job will show "at" on a mismatch (see below)
The one downside of the failure message is that Sidekiq stores a float for the at option, and it might cause confusion when you first see the actual vs expected (your eye first goes to the missing .0. We purposefully coerce to integers to avoid fractional second drift when comparing.
First reported in #183 and solution from #182
Closes #183
Additional freebies in this PR:
at
since that's what will be on the Sidekiq Job. We move the parsing/handling of expected values forat
versusin
to the methods inHaveEnqueuedJob
in
as the actual Sidekiq job will show "at" on a mismatch (see below)The one downside of the failure message is that Sidekiq stores a
float
for theat
option, and it might cause confusion when you first see the actual vs expected (your eye first goes to the missing.0
. We purposefully coerce to integers to avoid fractional second drift when comparing.