wspurgin / rspec-sidekiq

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

have_enqueued_sidekiq_job "at" function is undefined #149

Closed magedmakled closed 6 years ago

magedmakled commented 6 years ago

My worker perform method doesn't take any argument so I'm trying to test it with expect(MyWorker).to have_enqueued_sidekiq_job().at(Time.now) but I'm getting undefined methodat' for #`

Any suggestions?

packrat386 commented 6 years ago

Can I get a full code sample as well as a version of the library? It looks like it's using some matcher out of the built in ones of RSpec.

magedmakled commented 6 years ago

I agree with you on the matcher issue. It also gives me undefined method configure for RSpec::Sidekiq:Module when I try to RSpec::Sidekiq.configure do |config| in the spec_helper

here is my rspec gems, I'm not using Rails, I'm using Sinatra

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)
magedmakled commented 6 years ago

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