Bump rspec-sidekiq from 3.1.0 to 4.0.0
Bumps rspec-sidekiq from 3.1.0 to 4.0.0.
Release notes
Sourced from rspec-sidekiq's releases.
v4.0.0- 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
'sSidekiq::Batches
is now opt-in and disabled by defaultNew 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))
... (truncated)
Changelog
Sourced from rspec-sidekiq's changelog.
4.0.0
- [BREAKING] Dropped support for matching jobs on ActiveJob's private API args, (e.g.
_aj_globalid
and_aj_ruby2_keywords
)._aj_globalid
can be replaced with the object itself, e.g.have_enqueued_sidekiq_job(user)
.- [BREAKING] Dropped support for Ruby 2.6
- [BREAKING] Mocking Sidekiq::Batch is now opt in (was opt-out) by default
- [BREAKING] Dropped the
have_enqueued_job
matcher (deprecated since v3)- [BREAKING] Dropped support for Sidekiq <5
- [BREAKING] Dropped support for Rails 5
- Add support for Sidekiq 7 (#192)
- Add support for builtin argument matchers from rspec mocks for
have_enqueued_sidekiq_job
(#200)- Add
#on
tohave_enqueued_sidekiq_job
to support testing queue at enqueue time (#197)- Add
enqueue_sidekiq_job
for block-syntax style expectations- Clarified
have_enqueued_sidekiq_job
error message to make it clear that the "actual arguments" list is an array of argument-lists across all enqueued jobs. (#195)- Fix
in
andat
evaluation to match Sidekiq (#194)- Fix
be_delayed
argument matcher (#196)- Fix argument matching ignoring order (#200)
- Fix
be_delayed
time math when usingdelay_for
(#198)
Commits
-
bdd2b52
Bump version to 4 -
b4851ac
Bump version for prerelease -
b28ca05
Cleanup readme for prerelease -
cbbcc84
Merge pull request #201 from wspurgin/block-syntax -
693947f
Handle Sidekiq <7 gracefully -
8af5b52
Move expectation to regex for flexibility -
8ab8234
Add enqueue_sidekiq_job to readme -
5e2ea9e
Add chainability spec -
a1983b5
Block syntax via enqueue_sidekiq_job -
9cfcc8a
Update change log - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
@dependabot-bot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts