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.
39 40 41 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 39 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.
42 43 44 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 42 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.
44 45 46 47 48 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 44 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.
50 51 52 53 54 55 56 |
# File 'lib/rspec/sidekiq/matchers/base.rb', line 50 def unwrapped_arguments args = job["args"] return deserialized_active_job_args if active_job? args end |