New
v5.1.0
Features
🎱 Sidekiq 8 Support
:bow: @jukra fixed our incompatibility through #233
with_context matcher
To add coverage for testing anything set on the Job context. Whether through something like the Current Attributes middleware or setting things directly on the Job.
expect {
AwesomeJob.set(trace_id: "something").perform_async
}.to enqueue_sidekiq_job.with_context(trace_id: anything)
AwesomeJob.set(retry: 5).perform_async
expect(AwesomeJob).to have_enqueued_sidekiq_job.with_context(retry: 5)
# Something set through the Current Attributes middleware
expect(AwesomeJob).to have_enqueued_sidekiq_job.with_context(cattr: hash_including("my_special_attribute" => anything()))
⏲️ Sidekiq Enterprise unique until sub matcher
:bow: added in #232 by @wizardofelves (updating the original work from @leviwilson in #147)
# in e.g., AwesomeJob
sidekiq_options unique_for: 1.hour, unique_until: :start
# in spec
it { is_expected.to be_unique.until(:start) }
What's Changed
- Add frozen_string_literal: true everywhere by @ericproulx in https://github.com/wspurgin/rspec-sidekiq/pull/220
- Add changelog_uri to gemspec by @fynsta in https://github.com/wspurgin/rspec-sidekiq/pull/223
- Fix pattern matching warnings on Ruby 2.7 by @r7kamura in https://github.com/wspurgin/rspec-sidekiq/pull/227
- fix queue always nil in default_retries_exhausted_message by @pboling in https://github.com/wspurgin/rspec-sidekiq/pull/229
- Support for Sidekiq 8 by @jukra in https://github.com/wspurgin/rspec-sidekiq/pull/233
- Support with_context matcher by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/222
- Sidekiq Enterprise: until matcher by @wizardofelves in https://github.com/wspurgin/rspec-sidekiq/pull/232
- Resolve sidekiq_options typo by @tarellel in https://github.com/wspurgin/rspec-sidekiq/pull/235
New Contributors
- @ericproulx made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/220
- @fynsta made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/223
- @r7kamura made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/227
- @pboling made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/229
- @jukra made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/233
- @wizardofelves made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/232
- @tarellel made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/235
Full Changelog: https://github.com/wspurgin/rspec-sidekiq/compare/v5.0.0...v5.1.0