Module: RSpec::EnqueueSidekiqJob
- Defined in:
- lib/rspec/enqueue_sidekiq_job.rb,
lib/rspec/enqueue_sidekiq_job/version.rb
Overview
An includable module that provides ‘enqueue_sidekiq_job` matcher
Constant Summary collapse
- VERSION =
'1.2.0'.freeze
Instance Method Summary collapse
-
#enqueue_sidekiq_job(worker_class) ⇒ Object
Checks if a certain job was enqueued in a block.
Instance Method Details
#enqueue_sidekiq_job(worker_class) ⇒ Object
Checks if a certain job was enqueued in a block.
expect { AwesomeWorker.perform_async }
.to enqueue_sidekiq_job(AwesomeWorker)
expect { AwesomeWorker.perform_async(42, ‘David’)
.to enqueue_sidekiq_job(AwesomeWorker).with(42, 'David')
time = 5.minutes.from_now expect { AwesomeWorker.perform_at(time) }
.to enqueue_sidekiq_job(AwesomeWorker).at(time)
interval = 5.minutes expect { AwesomeWorker.perform_in(interval) }
.to enqueue_sidekiq_job(AwesomeWorker).in(5.minutes)
24 25 26 |
# File 'lib/rspec/enqueue_sidekiq_job.rb', line 24 def enqueue_sidekiq_job(worker_class) Matcher.new(worker_class) end |