Class: Maze::Api::Cucumber::Scenario
- Inherits:
-
Object
- Object
- Maze::Api::Cucumber::Scenario
- Defined in:
- lib/maze/api/cucumber/scenario.rb
Overview
An abstraction for the underlying Cucumber scenarios
Instance Method Summary collapse
- #complete ⇒ Object
-
#initialize(scenario) ⇒ Scenario
constructor
A new instance of Scenario.
- #mark_as_failed(reason) ⇒ Object
Constructor Details
#initialize(scenario) ⇒ Scenario
Returns a new instance of Scenario.
8 9 10 11 12 |
# File 'lib/maze/api/cucumber/scenario.rb', line 8 def initialize(scenario) @scenario = scenario @fail_override = false @fail_override_reason = nil end |
Instance Method Details
#complete ⇒ Object
19 20 21 |
# File 'lib/maze/api/cucumber/scenario.rb', line 19 def complete @scenario.fail(@fail_override_reason) if @fail_override end |
#mark_as_failed(reason) ⇒ Object
14 15 16 17 |
# File 'lib/maze/api/cucumber/scenario.rb', line 14 def mark_as_failed(reason) @fail_override = true @fail_override_reason = reason end |