Module: RSpec::Sidekiq::Matchers
- Includes:
- Mocks::ArgumentMatchers
- Defined in:
- lib/rspec/sidekiq/matchers/base.rb,
lib/rspec/sidekiq/matchers/be_unique.rb,
lib/rspec/sidekiq/matchers/be_delayed.rb,
lib/rspec/sidekiq/matchers/be_retryable.rb,
lib/rspec/sidekiq/matchers/be_expired_in.rb,
lib/rspec/sidekiq/matchers/save_backtrace.rb,
lib/rspec/sidekiq/matchers/be_processed_in.rb,
lib/rspec/sidekiq/matchers/enqueue_sidekiq_job.rb,
lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb
Defined Under Namespace
Classes: Base, BeDelayed, BeExpiredIn, BeProcessedIn, BeRetryable, BeUnique, EnqueueSidekiqJob, EnqueuedJob, EnqueuedJobs, HaveEnqueuedSidekiqJob, JobArguments, JobOptionParser, SaveBacktrace
Instance Method Summary
collapse
Instance Method Details
#be_delayed(*expected_arguments) ⇒ Object
6
7
8
|
# File 'lib/rspec/sidekiq/matchers/be_delayed.rb', line 6
def be_delayed(*expected_arguments)
BeDelayed.new(*expected_arguments)
end
|
#be_expired_in(expected_argument) ⇒ Object
4
5
6
|
# File 'lib/rspec/sidekiq/matchers/be_expired_in.rb', line 4
def be_expired_in(expected_argument)
BeExpiredIn.new(expected_argument)
end
|
#be_processed_in(expected_queue) ⇒ Object
4
5
6
|
# File 'lib/rspec/sidekiq/matchers/be_processed_in.rb', line 4
def be_processed_in(expected_queue)
BeProcessedIn.new expected_queue
end
|
#be_retryable(expected_retry) ⇒ Object
4
5
6
|
# File 'lib/rspec/sidekiq/matchers/be_retryable.rb', line 4
def be_retryable(expected_retry)
BeRetryable.new expected_retry
end
|
#be_unique ⇒ Object
4
5
6
|
# File 'lib/rspec/sidekiq/matchers/be_unique.rb', line 4
def be_unique
BeUnique.new
end
|
#enqueue_sidekiq_job(job_class = nil) ⇒ Object
Passes if a Job is enqueued as the result of a block. Chainable ‘with` for arguments, `on` for queue, `at` for queued for a specific time, and `in` for a specific interval delay to being queued, `immediately` for queued without delay.
81
82
83
|
# File 'lib/rspec/sidekiq/matchers/enqueue_sidekiq_job.rb', line 81
def enqueue_sidekiq_job(job_class = nil)
EnqueueSidekiqJob.new(job_class)
end
|
#have_enqueued_sidekiq_job(*expected_arguments) ⇒ Object
4
5
6
|
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 4
def have_enqueued_sidekiq_job(*expected_arguments)
HaveEnqueuedSidekiqJob.new expected_arguments
end
|
#save_backtrace(expected_backtrace = true) ⇒ Object
4
5
6
|
# File 'lib/rspec/sidekiq/matchers/save_backtrace.rb', line 4
def save_backtrace(expected_backtrace=true)
SaveBacktrace.new expected_backtrace
end
|