Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rspec-sidekiq requirement from ~> 3.0 to ~> 4.0 #95

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 15, 2023

Updates the requirements on rspec-sidekiq to permit the latest version.

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'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))

... (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 to have_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 and at evaluation to match Sidekiq (#194)
  • Fix be_delayed argument matcher (#196)
  • Fix argument matching ignoring order (#200)
  • Fix be_delayed time math when using delay_for (#198)

3.1.0

  • Add support for latest ruby and Rails 5 (coding-bunny #156)
  • Support Class#method notation in batch callback (caalberts #155)
  • Fix bug with time comparison in delayed jobs (geeosh #153 with help from col)
  • remove usage of Integer#blank? (lanej #152)
  • Add NullBatch#description (dsantosmerino #139)
  • README updates (BenMusch #142, akihikodaki #141, wpolicarpo #160)

3.0.3

  • Re-splat arguments for the have_enqueued_job alias (aprescott #136)

3.0.2

  • README updates (nilsding #110, packrat386 #122)
  • Ruby 2.4 support (packrat386 #119)
  • Fixes for Sidekiq 5 deprecations (packrat #130 with help from trev)

3.0.1

  • Remove implicit runtime dependency on ActiveSupport [aprescott#109]

3.0.0

  • Use default arguments for NullStatus initialization [briansharon#111]
  • Fix at and in chainable methods [wpolicarpo#109]
  • Rely on all of RSpec in development [packrat386#101]
  • Pass exception to within_sidekiq_retries_exhausted_block [packrat386#100]
  • Add support for testing scheduled jobs [wpolicarpo#81]
  • only depend on rspec-core [urkle#96]

... (truncated)

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 will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [rspec-sidekiq](https://github.com/wspurgin/rspec-sidekiq) to permit the latest version.
- [Release notes](https://github.com/wspurgin/rspec-sidekiq/releases)
- [Changelog](https://github.com/wspurgin/rspec-sidekiq/blob/main/CHANGES.md)
- [Commits](wspurgin/rspec-sidekiq@v3.0.0...v4.0.0)

---
updated-dependencies:
- dependency-name: rspec-sidekiq
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Aug 15, 2023
@dependabot dependabot bot requested a review from andrcuns August 15, 2023 23:18
@arturictus arturictus merged commit d7a6fd1 into master Aug 16, 2023
14 checks passed
@dependabot dependabot bot deleted the dependabot/bundler/rspec-sidekiq-tw-4.0 branch August 16, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant