Class: FluQ::Handler::Test
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Attributes inherited from Base
#config, #name, #pattern, #reactor
Instance Method Summary collapse
-
#initialize ⇒ Test
constructor
A new instance of Test.
- #on_events(events) ⇒ Object
Methods inherited from Base
Methods included from Mixins::Loggable
Constructor Details
#initialize ⇒ Test
Returns a new instance of Test.
28 29 30 31 |
# File 'lib/fluq/testing.rb', line 28 def initialize(*) super @events = [] end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
26 27 28 |
# File 'lib/fluq/testing.rb', line 26 def events @events end |
Instance Method Details
#on_events(events) ⇒ Object
33 34 35 36 |
# File 'lib/fluq/testing.rb', line 33 def on_events(events) raise RuntimeError, "Test Failure!" if events.any? {|e| e.tag == "error.event" } @events.concat events end |