Recent Releases of https://github.com/wspurgin/rspec-sidekiq
https://github.com/wspurgin/rspec-sidekiq - v5.2.0
Welcome new co-maintainer!
Welcome @ydah as another maintainer for rspec-sidekiq. As you'll find in the changelog, @ydah has been contributing quite a bit to the health of the project to make sure even more maintainable going forward.
Thank you for joining the project!
Additions and bug-fixes
- Add
nevermatcher for aliasingexactly(0)by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/256 - fix spec to define sidekiq options by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/237
- fix matcher to support exactly(0) by @monkeyWzr in https://github.com/wspurgin/rspec-sidekiq/pull/238
Full Changelog
- fix spec to define sidekiq options by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/237
- Update gemspec metadata to include source code and bug tracker URIs by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/249
- Update Ruby version to 3.2.8 in .ruby-version by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/240
- Delete the unnecessary .rubocop.yml file by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/242
- Add spell checking GitHub Actions workflow by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/241
- Replace pry with debug in development dependencies by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/243
- Added dependabot for GitHub Actions by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/244
- Remove unnecessary example RSpec configuration file by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/245
- Change rspec command by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/246
- Remove unnecessary dependencies by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/247
- Use
require_relativein the RSpec Sidekiq codebase by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/248 - fix matcher to support exactly(0) by @monkeyWzr in https://github.com/wspurgin/rspec-sidekiq/pull/238
- Add Ruby 3.4 to CI matrix in GitHub Actions workflow by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/239
- fix: Method has a
?suffix, it returns true/false by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/261 - Add failure test case for expecting zero job enqueues by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/255
- Update .gitignore to include .ruby-version and remove .ruby-version file by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/252
- fix: remove outdated GitHub link from README by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/253
- fix: improve minus! method to return self for non-EnqueuedJobs inputs by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/254
- Add
nevermatcher for aliasingexactly(0)by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/256 - chore: reorder dependencies in rspec-sidekiq.gemspec for clarity by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/257
- chore: Changing Sidekiq version branching to use RSpec metadata by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/258
- chore: clean up spacing and linebreak by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/259
- chore: add CI workflow to include ruby-head by @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/260
- chore: add maintainer information for
@ydahby @ydah in https://github.com/wspurgin/rspec-sidekiq/pull/262 - chore: prep for release of 5.2.0 by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/263
New Contributors
- @ydah made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/249
- @monkeyWzr made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/238
Full Changelog: https://github.com/wspurgin/rspec-sidekiq/compare/v5.1.0...v5.2.0
- Ruby
Published by wspurgin 8 months ago
https://github.com/wspurgin/rspec-sidekiq - v5.1.0
Features
🎱 Sidekiq 8 Support
🙇 @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
🙇 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
- Ruby
Published by wspurgin 12 months ago
https://github.com/wspurgin/rspec-sidekiq - v5.0.0
Breaking ❗
have_enqueued_sidekiq_job()matches jobs with any arguments (same asenqueue_sidekiq_job()orhave_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
- Support
have_enqueued_sidekiq_jobwith no args by @3v0k4 in https://github.com/wspurgin/rspec-sidekiq/pull/215 - Support expected counts by @3v0k4 in https://github.com/wspurgin/rspec-sidekiq/pull/219
- Prep for 5.0 release by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/218
Full Changelog: https://github.com/wspurgin/rspec-sidekiq/compare/v4.2.0...v5.0.0
As always, bug reports and additions are always most welcome!
- Ruby
Published by wspurgin almost 2 years ago
https://github.com/wspurgin/rspec-sidekiq - v4.2.0
What's Changed
- Fix: require matchers explicitly by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/214
- Warn when using
have_enqueued_sidekiq_jobwith no arguments for upcoming behavior change by @3v0k4 in https://github.com/wspurgin/rspec-sidekiq/pull/216 & #217
New Contributors
- @3v0k4 made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/216
Full Changelog: https://github.com/wspurgin/rspec-sidekiq/compare/v4.1.0...v4.2.0
- Ruby
Published by wspurgin almost 2 years ago
https://github.com/wspurgin/rspec-sidekiq - v4.1.0
What's Changed
- added required_ruby_version >= 2.7 into gemspec by @skunkworker in https://github.com/wspurgin/rspec-sidekiq/pull/209
- Add "immediately" matcher by @chrismaximin in https://github.com/wspurgin/rspec-sidekiq/pull/210
- Include composable module in base matcher by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/211
New Contributors
- @skunkworker made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/209
- @chrismaximin made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/210
Full Changelog: https://github.com/wspurgin/rspec-sidekiq/compare/v4.0.2...v4.1.0
- Ruby
Published by wspurgin over 2 years ago
https://github.com/wspurgin/rspec-sidekiq -
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_jobmatcher - Mocking
Sidekiq::Pro'sSidekiq::Batchesis 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.
- 👋 Hi I'm the new maintainer by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/190
- Support Sidekiq 7 by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/192
- Update Batches mocking to be opt-in by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/193
- Correct evaluation for "in" option by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/194
- Update failure message to list out actual jobs line-by-line by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/195
- Ignore argument check when expected_arguments empty by @teckwan in https://github.com/wspurgin/rspec-sidekiq/pull/196
- Add
#onmatcher by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/197 - 🐛 Fix be_delayed interval calculation by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/198
- Remove have_enqueued_job and rename files/class by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/199
- Use ArgumentListMatcher to ensure order and allow use of richer builtin Argument matchers by @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/200
- Block syntax
enqueue_sidekiq_jobby @wspurgin in https://github.com/wspurgin/rspec-sidekiq/pull/201
New Contributors
- @wspurgin made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/190
- @teckwan made their first contribution in https://github.com/wspurgin/rspec-sidekiq/pull/196
Full Changelog: https://github.com/wspurgin/rspec-sidekiq/compare/v3.1.0...v4.0.0
- Ruby
Published by wspurgin over 2 years ago
https://github.com/wspurgin/rspec-sidekiq - 4.0.0.pre
v4.0.0.pre - We have a (pre)release! 🚀
What needs testing in the wild
I personally don't use ActiveJob basically at all in any project where I use Sidekiq. This is mostly just from longstanding habit since Sidekiq 5 and the known performance drops one encountered when using ActiveJob as a middle-man.
As such, I don't have a place to play around with how testing ActiveJob with v4 works (or doesn't!). If anyone uses ActiveJob with Sidekiq and uses this repo for testing your Sidekiq-ery, please give this prerelease a try and send in issues and feedback.
For all other plain-ol' Sidekiq users, your feedback and bug reports are also most welcome. 😄
- Ruby
Published by wspurgin over 2 years ago
https://github.com/wspurgin/rspec-sidekiq -
3.1.0
- Add support for latest ruby and Rails 5 (coding-bunny #156)
- Support
Class#methodnotation 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)
- Ruby
Published by packrat386 over 5 years ago
https://github.com/wspurgin/rspec-sidekiq - 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)
- Ruby
Published by packrat386 over 8 years ago
https://github.com/wspurgin/rspec-sidekiq - 3.0.1
- Remove implicit runtime dependency on ActiveSupport [aprescott#109]
- Ruby
Published by packrat386 almost 9 years ago
https://github.com/wspurgin/rspec-sidekiq - 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]
- Add support for Sidekiq Enterprise [Geesu#82]
- Fix clash with rspec-rails [pavel-jurasek-bcgdv-com#95]
- Ruby
Published by philostler almost 9 years ago
https://github.com/wspurgin/rspec-sidekiq - 2.2.0
- Fix typo in README file [bradhaydon#87]
- Fix type in readme [graudeejs#80]
- Matchers::HaveEnqueuedJob breaks on jobs with Hash arguments [erikogan#77]
- have_enqueued_job fails if args includes a Hash bug [gPrado#74]
- Ruby
Published by philostler about 10 years ago
https://github.com/wspurgin/rspec-sidekiq - 2.1.0
- ActiveJob support [tarzan#71]
- adding be expired in matcher [bernabas#72]
- Fixed testing failures with be_delayed matcher due to rename of
enqueued_attocreated_atin latest Sidekiq [philostler] - Add support for NullBatch#on and NullStatus#failures to the null batch objects. [PacerPRO#64]
- Adding a save_backtrace matcher [webdestroya#61]
- Add flag to skip Batch stubs [paulfri#69]
- allow passing an instance method to be_delayed matcher [lastobelus#63]
- Ruby
Published by philostler over 10 years ago
https://github.com/wspurgin/rspec-sidekiq - 2.0.0
- Get specs to green [petergoldstein#58]
- Update spec syntax in README. [futhr#60]
- Ruby
Published by philostler over 10 years ago
https://github.com/wspurgin/rspec-sidekiq - 2.0.0.beta
- Add support for 3.0.0 [yelled3#47]
- Completely remove have_enqueued_jobs matcher [philostler#56]
- Ruby
Published by philostler over 11 years ago
https://github.com/wspurgin/rspec-sidekiq - 1.1.0
- Added Support for RSpec 3 [TBAA#44]
- Fix gem build error ERROR: (Gem::InvalidSpecificationException) [mourad-ifeelgoods#42]
- Make sure sidekiq is required [mourad-ifeelgoods#43]
- attempt at fixing 'undefined method `configure' for RSpec:Module' [homanchou#51]
- Supports accessing the batch id [fabiokr#54]
- Pass message hash to retries_exhausted block [layervault#52]
- added support for unique scheduled worker matching [jkogara#55]
- Ruby
Published by philostler over 11 years ago
https://github.com/wspurgin/rspec-sidekiq - 1.0.0
- Improve coverage and readability of README [philostler#26]
- Greatly increase test coverage [philostler#27]
- Refactor and greatly improve be_a_delayed_job matcher (now be_delayed) [philostler#24 & #25]
- Add implementation of status.total [matthargett & Kelly Felkins#32 & #39]
- Fix Rubinius build [petergoldstein#38]
- Remove have_enqueued_jobs matcher [philostler#37]
- Travis - Ruby 2.1.0, fix Rubinius build [petergoldstein#35]
- Prepare for RSpec 3.x [petergoldstein#34]
- Print warning when used in development mode [mperham & philostler#33]
- Add helper for testing retries exhausted block [Noreaster76#31]
- Allow to use general matchers in have_enqueued_job [johanneswuerbach#30]
- Loosen RSpec dependency [philostler#23]
- Add delay extension matchers [sosaucily#22]
- Update coveralls development dependency to version 0.7.x [philostler]
- Ruby
Published by philostler about 12 years ago
https://github.com/wspurgin/rspec-sidekiq - 0.5.1
- Allows Sidekiq::Batch support to work with Mocha as well RSpec stubbing [noiseunion#20]
- Ruby
Published by philostler over 12 years ago
https://github.com/wspurgin/rspec-sidekiq - 0.5.0
- Adds stub support for Sidekiq::Batch [kmayer#17]
- Ruby
Published by philostler over 12 years ago