rspec-sidekiq
rspec-sidekiq copied to clipboard
have_enqueued_job wrong number of arguments (3 for 0..1)
I get this error when I try to use this API. I'm afraid I'm using it incorrectly.
UnlockContentJob.perform_later(1, 2, 3)
expect(UnlockContentJob).to have_enqueued_job(1, 2, 3)
Failure/Error: expect(UnlockContentJob).to have_enqueued_job(1, 2, 3)
ArgumentError:
wrong number of arguments (3 for 0..1)
The docs show multiple args:
expect(AwesomeJob).to have_enqueued_job('Awesome', true)
UnlockContentJob is an ActiveJob subclass. Could that be why? Do I need to do something special to set up this gem for ActiveJob? It looked like the adapter was set by the gem.
Seems like https://github.com/philostler/rspec-sidekiq/issues/83 might be the culprit.
If you're using ActiveJob you don't need this gem at all with the latest version of RSpec.
When using methods like retryable? from rspec-sidekiq, you can not dump the Gem, since the latest version of RSpec does not implement those methods..
Closed with #199 for good.