Class: RSpec::Sidekiq::Matchers::NamedQueueJob Private
- Inherits:
-
Object
- Object
- RSpec::Sidekiq::Matchers::NamedQueueJob
- Defined in:
- lib/rspec/sidekiq/matchers/have_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 collapse
- #entry ⇒ Object readonly private
- #item ⇒ Object readonly private
Instance Method Summary collapse
- #args ⇒ Object private
- #error_class ⇒ Object private
- #error_message ⇒ Object private
- #failed_at ⇒ Object private
-
#initialize(entry) ⇒ NamedQueueJob
constructor
private
A new instance of NamedQueueJob.
- #klass ⇒ Object private
- #retry_count ⇒ Object private
- #wrapped ⇒ Object private
Constructor Details
#initialize(entry) ⇒ NamedQueueJob
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 NamedQueueJob.
245 246 247 248 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 245 def initialize(entry) @entry = entry @item = entry.respond_to?(:item) ? entry.item : entry end |
Instance Attribute Details
#entry ⇒ Object (readonly)
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.
243 244 245 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 243 def entry @entry end |
#item ⇒ Object (readonly)
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.
243 244 245 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 243 def item @item end |
Instance Method Details
#args ⇒ 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.
258 259 260 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 258 def args entry.respond_to?(:args) ? entry.args : item["args"] end |
#error_class ⇒ 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.
266 267 268 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 266 def error_class entry.respond_to?(:error_class) ? entry.error_class : item["error_class"] end |
#error_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.
262 263 264 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 262 def entry.respond_to?(:error_message) ? entry. : item["error_message"] end |
#failed_at ⇒ 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.
274 275 276 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 274 def failed_at entry.respond_to?(:failed_at) ? entry.failed_at : item["failed_at"] end |
#klass ⇒ 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.
250 251 252 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 250 def klass entry.respond_to?(:klass) ? entry.klass.to_s : item["class"].to_s end |
#retry_count ⇒ 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.
270 271 272 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 270 def retry_count entry.respond_to?(:retry_count) ? entry.retry_count : item["retry_count"] end |
#wrapped ⇒ 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.
254 255 256 |
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 254 def wrapped item["wrapped"] end |