Class: RSpec::Sidekiq::Matchers::HaveEnqueuedSidekiqJob Private
- Defined in:
- lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Base
#actual_jobs, #expected_arguments, #expected_options, #klass
Instance Method Summary collapse
-
#initialize(expected_arguments) ⇒ HaveEnqueuedSidekiqJob
constructor
private
A new instance of HaveEnqueuedSidekiqJob.
- #matches?(job_class) ⇒ Boolean private
Methods inherited from Base
#at, #description, #failure_message, #failure_message_when_negated, #formatted, #immediately, #in, #normalize_arguments, #on, #with
Constructor Details
#initialize(expected_arguments) ⇒ HaveEnqueuedSidekiqJob
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of HaveEnqueuedSidekiqJob.
10 11 12 13 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 10 def initialize(expected_arguments) super() @expected_arguments = normalize_arguments(expected_arguments) end |
Instance Method Details
#matches?(job_class) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 20 21 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 15 def matches?(job_class) @klass = job_class @actual_jobs = EnqueuedJobs.new(klass) actual_jobs.includes?(expected_arguments, ) end |