rspecrspec-sidekiq

rspec-sidekiq have_enqueued_sidekiq_job undefined method at


expect(MyWorker).to have_enqueued_sidekiq_job().at(Time.now)

causing me to get this error

undefined method at for #RSpec::Matchers::BuiltIn::Has:0x007fecb7f0a068`

Here are my rspec Gems

rspec (3.6.0)
rspec-core (3.6.0)
rspec-expectations (3.6.0)
rspec-mocks (3.6.0)
rspec-sidekiq (3.0.3)
rspec-support (3.6.0)

Solution

  • Fixed it with require rspec-sidekiq in spec_helper.rb