Search code examples
ruby-on-railsrspecsidekiq

how to disable warning message with sidekiq in rspec


I'm fairly new to rails and testing. Documentation says to add this code to spec_helper.rb:

RSpec::Sidekiq.configure do |config|
  config.warn_when_jobs_not_processed_by_sidekiq = false
end

but when I do, i get an error:

uninitialized constant RSpec::Sidekiq (NameError)

Solution

  • If you have rspec 3, then you should try to add following code to rails_helper.rb instead of spec_helper.rb