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, #never, #normalize_arguments, #on, #once, #set_expected_count, #thrice, #times, #twice, #with, #with_context
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.
12 13 14 15 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 12 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.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 17 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.
29 30 31 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb', line 29 def "have enqueued" end |