Skip to content

v4.0.2

Compare
Choose a tag to compare
@wspurgin wspurgin released this 15 Aug 13:55
· 15 commits to main since this release

v4 - We have a release! πŸš€

This repo was in ownership limbo for a few years, but now it's getting some TLC. v4 aims to squish some long standing bugs and add a few nice features we've been missing.

All feedback and bug reports are also most welcome. πŸ˜„

Summary of changes

BREAKING Changes

  • Dropped support for Rubies < 2.7
  • Dropped support for Sidekiq <5
  • Dropped support for Rails <5
  • Drop have_enqueued_job matcher
  • Mocking Sidekiq::Pro's Sidekiq::Batches is now opt-in and disabled by default

New features

Block syntax πŸ€™

Many examples in the README, but here's a teaser:

expect { AwesomeJob.perform_async "Awesome!" }.to enqueue_sidekiq_job(AwesomeJob).with("Awesome!")

#on chainable matcher ⛓️

Wanna test which queue your job was enqueued on? Go for it:

# Both block style and yee old have_enqueued_sidekiq_job style supports it

expect { AwesomeJob.set(queue: "high").perform_async }.to enqueue_sidekiq_job(AwesomeJob).on("high")
expect(AwesomeJob).to have_enqueued_sidekiq_job.on("high")

RSpec builtin args matchers πŸ™Œ

Finally you can use those lovely builtin Args matchers from rspec-mocks

expect {
  AwesomeJob.perform_async({ "important_arg" => true })
}.to enqueue_sidekiq_job(AwesomeJob).with(hash_including("important_arg" => boolean))

# or using the non-block style
expect(AwesomeJob).to have_enqueued_sidekiq_job(hash_including("important_arg" => boolean))

PR list

Many other bug fixes, and enhancements have gone into v4 as well. Here's all the PRs.

v4.0.1

  • Restore normalizing args to fix unintentional breaking change with symbols #205

v4.0.2

  • Explicitly require forwardable #204

New Contributors

Full Changelog: v3.1.0...v4.0.2