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_count, #expected_options, #klass
Instance Method Summary collapse
-
#initialize(expected_arguments) ⇒ HaveEnqueuedSidekiqJob
constructor
private
A new instance of HaveEnqueuedSidekiqJob.
- #matches?(job_class) ⇒ Boolean private
- #prefix_message ⇒ Object private
Methods inherited from Base
#at, #at_least, #at_most, #common_message, #count_message, #description, #exactly, #failure_message, #failure_message_when_negated, #formatted, #immediately, #in, #normalize_arguments, #on, #once, #set_expected_count, #thrice, #times, #twice, #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 22 23 24 25 |
# 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 == [] ? any_args : expected_arguments, , expected_count ) end |
#prefix_message ⇒ Object
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.
27 28 29 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 27 def "have enqueued" end |