We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bundle exec ruby --version ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19] bundle exec rails --version Rails 6.0.2.2 bundle exec rspec --version RSpec 3.9 - rspec-core 3.9.1 - rspec-expectations 3.9.1 - rspec-mocks 3.9.1 - rspec-rails 4.0.0 - rspec-support 3.9.2
Failure/Error: expect(::RedactedJob).to have_been_enqueued.exactly(2).times NoMethodError: undefined method `exactly' for #<RSpec::ActiveJob::Matchers::EnqueueA:0x00007feb2aa89d10> # ./spec/redacted/enqueue_jobs_spec.rb:37:in `block (3 levels) in <module:Redacted>'
The 4.0 documentation has the following example, so I expected exactly to be defined.
exactly
UploadBackupsJob.perform_later('backup') expect(UploadBackupsJob).to have_been_enqueued.exactly(:once)
expect(::RedactedJob).to have_been_enqueued.times(2)
Happy to, if determined to be needed.
The text was updated successfully, but these errors were encountered:
Can you please set a breakpoint and check what is the source of the class an instance of which have_been_enqueued returns?
have_been_enqueued
undefined method `exactly' for #<RSpec::ActiveJob::Matchers::EnqueueA:0x00007feb2aa89d10>
RSpec::ActiveJob::Matchers::EnqueueA doesn't look too similar to RSpec::Rails::Matchers::ActiveJob::HaveBeenEnqueued.
RSpec::ActiveJob::Matchers::EnqueueA
RSpec::Rails::Matchers::ActiveJob::HaveBeenEnqueued
Pretty sure you are using rspec-activejob. It's high time to start using rspec-rails's matchers instead.
rspec-activejob
rspec-rails
Sorry, something went wrong.
Thanks Phil, after uninstalling rspec-activejob, I can now use exactly.
Good to know @jaredbeck, happy to help 🙌
No branches or pull requests
What Ruby, Rails and RSpec versions are you using?
Observed behaviour
Expected behaviour
The 4.0 documentation has the following example, so I expected
exactly
to be defined.Workaround
Can you provide an example app?
Happy to, if determined to be needed.
The text was updated successfully, but these errors were encountered: