Class: RSpec::Sidekiq::Matchers::JobArguments Private
- Inherits:
-
Object
- Object
- RSpec::Sidekiq::Matchers::JobArguments
- Includes:
- Mocks::ArgumentMatchers
- Defined in:
- lib/rspec/sidekiq/matchers/base.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
- #job ⇒ Object private
Instance Method Summary collapse
-
#initialize(job) ⇒ JobArguments
constructor
private
A new instance of JobArguments.
- #matches?(expected_args) ⇒ Boolean private
- #unwrapped_arguments ⇒ Object private
Constructor Details
#initialize(job) ⇒ JobArguments
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 JobArguments.
91 92 93 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 91 def initialize(job) self.job = job end |
Instance Attribute Details
#job ⇒ 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.
94 95 96 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 94 def job @job end |
Instance Method Details
#matches?(expected_args) ⇒ 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.
96 97 98 99 100 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 96 def matches?(expected_args) matcher = RSpec::Mocks::ArgumentListMatcher.new(*expected_args) matcher.args_match?(*unwrapped_arguments) end |
#unwrapped_arguments ⇒ 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.
102 103 104 105 106 107 108 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 102 def unwrapped_arguments @unwrapped_arguments ||= begin args = job["args"] active_job? ? deserialized_active_job_args : args end end |