Skip to content

v5.0.0

Latest
Compare
Choose a tag to compare
@wspurgin wspurgin released this 15 May 19:31
· 4 commits to main since this release
5becc96

Breaking ❗

  • have_enqueued_sidekiq_job() matches jobs with any arguments (same as enqueue_sidekiq_job() or have_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

Full Changelog: v4.2.0...v5.0.0

As always, bug reports and additions are always most welcome!