Class: Gurke::Reporter
- Inherits:
-
Object
- Object
- Gurke::Reporter
- Defined in:
- lib/gurke/reporter.rb
Overview
A Reporter provides callbacks that will be executed whenever a specific execution step starts or ends.
Direct Known Subclasses
Constant Summary collapse
- CALLBACKS =
List of all callback methods as symbols.
[ :before_features, :before_feature, :before_scenario, :before_step, :start_features, :start_feature, :start_scenario, :start_background, :start_step, :end_features, :end_feature, :end_scenario, :end_background, :end_step, :after_features, :after_feature, :after_scenario, :after_step ]
Instance Method Summary collapse
-
#after_feature(feature) ⇒ Object
Called after each feature and after all hooks.
-
#after_features(features) ⇒ Object
Called after all features and after all hooks.
-
#after_scenario(scenario) ⇒ Object
Called after each scenario and after all hooks.
-
#after_step(step_result, scenario) ⇒ Object
Called after each step, after all step hook.
-
#before_feature(feature) ⇒ Object
Called for each feature before it starts, but before any before-feature hook is run.
-
#before_features(features) ⇒ Object
Called before the execution of any feature and before any before-features hook is invoked.
-
#before_scenario(scenario) ⇒ Object
Called for each each scenario before it starts.
-
#before_step(step, scenario) ⇒ Object
Called before each step and before any before-step hook.
-
#end_background(background, scenario) ⇒ Object
Called after each background.
-
#end_feature(feature) ⇒ Object
Called after each feature but before any after hook.
-
#end_features(features) ⇒ Object
Called after all features but before any after-features hook.
-
#end_scenario(scenario) ⇒ Object
Called after each scenario but before any after hook.
-
#end_step(step_result, scenario) ⇒ Object
Called after each step but before any after-step hook.
-
#start_background(background, scenario) ⇒ Object
Called before each background.
-
#start_feature(feature) ⇒ Object
Called for each feature before it starts, but after all before-feature hooks.
-
#start_features(features) ⇒ Object
Called before the execute of any feature, but after all before-features hooks.
-
#start_scenario(scenario) ⇒ Object
Called for each each scenario before it starts, but after all before hooks for given scenario.
-
#start_step(step, scenario) ⇒ Object
Called before each step and after all before-step hooks.
Instance Method Details
#after_feature(feature) ⇒ Object
Called after each feature and after all hooks.
225 226 227 228 |
# File 'lib/gurke/reporter.rb', line 225 def after_feature(feature) raise NotImplementedError.new \ "#{self.class.name}#after_feature must be implemented in subclass." end |
#after_features(features) ⇒ Object
Called after all features and after all hooks.
247 248 249 250 |
# File 'lib/gurke/reporter.rb', line 247 def after_features(features) raise NotImplementedError.new \ "#{self.class.name}#after_features must be implemented in subclass." end |
#after_scenario(scenario) ⇒ Object
Called after each scenario and after all hooks.
203 204 205 206 |
# File 'lib/gurke/reporter.rb', line 203 def after_scenario(scenario) raise NotImplementedError.new \ "#{self.class.name}#after_scenario must be implemented in subclass." end |
#after_step(step_result, scenario) ⇒ Object
Called after each step, after all step hook.
179 180 181 182 |
# File 'lib/gurke/reporter.rb', line 179 def after_step(step_result, scenario) raise NotImplementedError.new \ "#{self.class.name}#after_step must be implemented in subclass." end |
#before_feature(feature) ⇒ Object
Called for each feature before it starts, but before any before-feature hook is run.
68 69 70 71 |
# File 'lib/gurke/reporter.rb', line 68 def before_feature(feature) raise NotImplementedError.new \ "#{self.class.name}#start_feature must be implemented in subclass." end |
#before_features(features) ⇒ Object
Called before the execution of any feature and before any before-features hook is invoked.
42 43 44 45 |
# File 'lib/gurke/reporter.rb', line 42 def before_features(features) raise NotImplementedError.new \ "#{self.class.name}#before_features must be implemented in subclass." end |
#before_scenario(scenario) ⇒ Object
Called for each each scenario before it starts. Will be called before any hooks for the given scenario is executed.
93 94 95 96 |
# File 'lib/gurke/reporter.rb', line 93 def before_scenario(scenario) raise NotImplementedError.new \ "#{self.class.name}#before_scenario must be implemented in subclass." end |
#before_step(step, scenario) ⇒ Object
Called before each step and before any before-step hook.
141 142 143 144 |
# File 'lib/gurke/reporter.rb', line 141 def before_step(step, scenario) raise NotImplementedError.new \ "#{self.class.name}#before_step must be implemented in subclass." end |
#end_background(background, scenario) ⇒ Object
Called after each background.
129 130 131 132 |
# File 'lib/gurke/reporter.rb', line 129 def end_background(background, scenario) raise NotImplementedError.new \ "#{self.class.name}#end_background must be implemented in subclass." end |
#end_feature(feature) ⇒ Object
Called after each feature but before any after hook.
214 215 216 217 |
# File 'lib/gurke/reporter.rb', line 214 def end_feature(feature) raise NotImplementedError.new \ "#{self.class.name}#end_feature must be implemented in subclass." end |
#end_features(features) ⇒ Object
Called after all features but before any after-features hook.
236 237 238 239 |
# File 'lib/gurke/reporter.rb', line 236 def end_features(features) raise NotImplementedError.new \ "#{self.class.name}#end_features must be implemented in subclass." end |
#end_scenario(scenario) ⇒ Object
Called after each scenario but before any after hook.
191 192 193 194 |
# File 'lib/gurke/reporter.rb', line 191 def end_scenario(scenario) raise NotImplementedError.new \ "#{self.class.name}#end_scenario must be implemented in subclass." end |
#end_step(step_result, scenario) ⇒ Object
Called after each step but before any after-step hook.
166 167 168 169 |
# File 'lib/gurke/reporter.rb', line 166 def end_step(step_result, scenario) raise NotImplementedError.new \ "#{self.class.name}#end_step must be implemented in subclass." end |
#start_background(background, scenario) ⇒ Object
Called before each background.
117 118 119 120 |
# File 'lib/gurke/reporter.rb', line 117 def start_background(background, scenario) raise NotImplementedError.new \ "#{self.class.name}#start_background must be implemented in subclass." end |
#start_feature(feature) ⇒ Object
Called for each feature before it starts, but after all before-feature hooks.
81 82 83 84 |
# File 'lib/gurke/reporter.rb', line 81 def start_feature(feature) raise NotImplementedError.new \ "#{self.class.name}#start_feature must be implemented in subclass." end |
#start_features(features) ⇒ Object
Called before the execute of any feature, but after all before-features hooks.
55 56 57 58 |
# File 'lib/gurke/reporter.rb', line 55 def start_features(features) raise NotImplementedError.new \ "#{self.class.name}#before_features must be implemented in subclass." end |
#start_scenario(scenario) ⇒ Object
Called for each each scenario before it starts, but after all before hooks for given scenario.
105 106 107 108 |
# File 'lib/gurke/reporter.rb', line 105 def start_scenario(scenario) raise NotImplementedError.new \ "#{self.class.name}#start_scenario must be implemented in subclass." end |
#start_step(step, scenario) ⇒ Object
Called before each step and after all before-step hooks.
153 154 155 156 |
# File 'lib/gurke/reporter.rb', line 153 def start_step(step, scenario) raise NotImplementedError.new \ "#{self.class.name}#start_step must be implemented in subclass." end |