wspurgin / rspec-sidekiq

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

`has_enqueued_sidekiq_job?` matcher not defined? #127

Closed mecampbellsoup closed 10 months ago

mecampbellsoup commented 7 years ago
spec/lib/otx/processors/ach_spec.rb|16 error|  Failure/Error: expect(AchTransactionProcessingJob).to have_enqueued_sidekiq_job(transaction.id) expected AchTransactionProcessingJob to respond to `has_enqueued_sidekiq_job?`

Code:

      def process
        if @transaction.transaction_type == "credit"
          AchTransactionProcessingJob.perform_async(@transaction.id)

Assertion:

      it "enqueues an AchTransactionProcessingJob" do
        subject
        expect(AchTransactionProcessingJob).to have_enqueued_sidekiq_job(transaction.id)
      end

Gemfile:

group :test do
  gem 'rspec-sidekiq'

Gemfile.lock:

    rspec-sidekiq (2.2.0)
jsuarezb commented 7 years ago

@mecampbellsoup I had the same problem. I updated the gem to the last version (3.0.1) and it worked.

coding-bunny commented 5 years ago

Having the same problem in 3.0.2 Had to browse through the issues to find the configuration first of all needs to be inside the rails_helper.rb, but still can't get this work properly

wspurgin commented 10 months ago

I think this was fixed a while back. If you still see issues on the latest prerelease LMK.