Class: Hyrax::Specs::SpyListener
- Inherits:
-
Object
- Object
- Hyrax::Specs::SpyListener
- Defined in:
- lib/hyrax/specs/spy_listener.rb
Overview
A spec support class for assisting in spec testing of the Hyrax::Publisher pub/sub behavior.
For each registered event, there are two corresponding instance methods
-
‘#on_<registered_event>`
-
‘#<registered_event>`
Then, for any spec you want to make sure Pub/Sub events fire, you can subscribe an instance of Hyrax::Specs::SpyListener. When your spec is completed, unsubscribe the instance.