wspurgin / rspec-sidekiq

RSpec for Sidekiq
https://github.com/wspurgin/rspec-sidekiq
Other
651 stars 133 forks source link

have_enqueued_sidekiq_job doesn't check order of arguments given to Job #144

Closed shifakhan closed 11 months ago

shifakhan commented 6 years ago

Code AwesomeJob.perform_async 'Awesome', true

Tests - expect(AwesomeJob).to have_enqueued_sidekiq_job('Awesome', true) expect(AwesomeJob).to have_enqueued_sidekiq_job(true, 'Awesome')

Both tests pass. Is this expected behaviour ? Shouldn't we check the order of the arguments as well?

jughead commented 6 years ago

Got the same problem by passing custom matcher. This is the reason: https://github.com/philostler/rspec-sidekiq/blob/develop/lib/rspec/sidekiq/matchers/have_enqueued_job.rb#L84

wspurgin commented 11 months ago

Oof yeah this is a nasty one since we use ContainsExactly which doesn't care about the order. I'll fix it for the V4 release