Class: RSpec::Sidekiq::Matchers::JobMatcher
- Inherits:
-
Object
- Object
- RSpec::Sidekiq::Matchers::JobMatcher
- Defined in:
- lib/rspec/sidekiq/matchers/have_enqueued_job.rb
Instance Attribute Summary collapse
-
#jobs ⇒ Object
readonly
Returns the value of attribute jobs.
Instance Method Summary collapse
-
#initialize(klass) ⇒ JobMatcher
constructor
A new instance of JobMatcher.
- #present?(arguments, options) ⇒ Boolean
Constructor Details
#initialize(klass) ⇒ JobMatcher
Returns a new instance of JobMatcher.
41 42 43 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_job.rb', line 41 def initialize(klass) @jobs = unwrap_jobs(klass.jobs) end |
Instance Attribute Details
#jobs ⇒ Object (readonly)
Returns the value of attribute jobs.
39 40 41 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_job.rb', line 39 def jobs @jobs end |
Instance Method Details
#present?(arguments, options) ⇒ Boolean
45 46 47 |
# File 'lib/rspec/sidekiq/matchers/have_enqueued_job.rb', line 45 def present?(arguments, ) !!find_job(arguments, ) end |