Class: Woodhouse::Dispatchers::TestDispatcher
- Inherits:
-
Woodhouse::Dispatcher
- Object
- Woodhouse::Dispatcher
- Woodhouse::Dispatchers::TestDispatcher
- Defined in:
- lib/woodhouse/dispatchers/test_dispatcher.rb
Overview
A dispatcher which simply swallows and stores jobs without performing them. This is to be used in testing other applications’ interactions with Woodhouse.
Instance Attribute Summary collapse
-
#job_updates ⇒ Object
readonly
All job updates (used in the Progress extension) which have been dispatched since this dispatcher was last cleared.
-
#jobs ⇒ Object
readonly
All jobs (Woodhouse::Job) which have been dispatched since this dispatcher was last cleared.
Instance Method Summary collapse
-
#clear! ⇒ Object
Wipe out all stored jobs and job updates.
Methods inherited from Woodhouse::Dispatcher
#dispatch, #dispatch_job, #initialize, #update_job
Constructor Details
This class inherits a constructor from Woodhouse::Dispatcher
Instance Attribute Details
#job_updates ⇒ Object (readonly)
All job updates (used in the Progress extension) which have been dispatched since this dispatcher was last cleared.
8 9 10 |
# File 'lib/woodhouse/dispatchers/test_dispatcher.rb', line 8 def job_updates @job_updates end |
#jobs ⇒ Object (readonly)
All jobs (Woodhouse::Job) which have been dispatched since this dispatcher was last cleared.
6 7 8 |
# File 'lib/woodhouse/dispatchers/test_dispatcher.rb', line 6 def jobs @jobs end |
Instance Method Details
#clear! ⇒ Object
Wipe out all stored jobs and job updates.
11 12 13 14 |
# File 'lib/woodhouse/dispatchers/test_dispatcher.rb', line 11 def clear! jobs.clear job_updates.clear end |