Breaking ❗
have_enqueued_sidekiq_job()
matches jobs with any arguments (same asenqueue_sidekiq_job()
orhave_enqueued_sidekiq_job(any_args)
). Previously it would only match jobs with no args (#215)
New features ✨
You can now specify the number of jobs that should match the expectation! Thanks you @3v0k4 for the much requested feature!
Use via one of the following chainable methods:
#once
#twice
#thrice
#exactly(n)
#at_least(n)
#at_most(n)
Examples:
expect(AwesomeJob).to have_enqueued_sidekiq_job.once
expect(AwesomeJob).to have_enqueued_sidekiq_job.exactly(1).time
expect(AwesomeJob).to have_enqueued_sidekiq_job.exactly(:once)
expect(AwesomeJob).to have_enqueued_sidekiq_job.at_least(1).time
expect(AwesomeJob).to have_enqueued_sidekiq_job.at_least(:once)
expect(AwesomeJob).to have_enqueued_sidekiq_job.at_most(2).times
expect(AwesomeJob).to have_enqueued_sidekiq_job.at_most(:twice)
expect(AwesomeJob).to have_enqueued_sidekiq_job.at_most(:thrice)
PR Changelog
- Support
have_enqueued_sidekiq_job
with no args by @3v0k4 in #215 - Support expected counts by @3v0k4 in #219
- Prep for 5.0 release by @wspurgin in #218
Full Changelog: v4.2.0...v5.0.0
As always, bug reports and additions are always most welcome!