Class: Procrastinator::Test::MockTask
- Inherits:
-
Object
- Object
- Procrastinator::Test::MockTask
- Defined in:
- lib/procrastinator/test/mocks.rb
Overview
Testing mock Task class
You can use this like:
require 'procrastinator/rspec/mocks'
# ...
Procrastinator.config do |c|
c.define_queue :test_queue, Procrastinator::RSpec::MockTask
end
Direct Known Subclasses
Instance Attribute Summary collapse
-
#container ⇒ Object
Returns the value of attribute container.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#scheduler ⇒ Object
Returns the value of attribute scheduler.
Instance Method Summary collapse
-
#run ⇒ Object
Records that the mock task was run.
-
#run? ⇒ Boolean
Whether the task was run.
Instance Attribute Details
#container ⇒ Object
Returns the value of attribute container.
24 25 26 |
# File 'lib/procrastinator/test/mocks.rb', line 24 def container @container end |
#logger ⇒ Object
Returns the value of attribute logger.
24 25 26 |
# File 'lib/procrastinator/test/mocks.rb', line 24 def logger @logger end |
#scheduler ⇒ Object
Returns the value of attribute scheduler.
24 25 26 |
# File 'lib/procrastinator/test/mocks.rb', line 24 def scheduler @scheduler end |
Instance Method Details
#run ⇒ Object
Records that the mock task was run.
27 28 29 |
# File 'lib/procrastinator/test/mocks.rb', line 27 def run @run = true end |
#run? ⇒ Boolean
32 33 34 |
# File 'lib/procrastinator/test/mocks.rb', line 32 def run? @run end |