Skip to content

Commit

Permalink
Add test failing scenario with output
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Aug 9, 2016
1 parent 34380d8 commit c23aef1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions features/testing_behat_in_behat.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Feature: Testing Behat in Behat
/** @Then it passes with output :output */
public function itPassesWithOutput($output) { echo $output; }
/** @Then it fails with output :output */
public function itFailsWithOutput($output) { throw new \RuntimeException($output); }
}
"""

Expand Down Expand Up @@ -58,3 +61,17 @@ Feature: Testing Behat in Behat
"""
When I run Behat
Then it should fail

Scenario: Failing scenario with output
Given a feature file "features/failing_scenario_with_output.feature" containing:
"""
Feature: Failing feature with output
Scenario: Failing scenario with output
Then it fails with output "Krzysztof Krawczyk"
"""
When I run Behat
Then it should fail with:
"""
Krzysztof Krawczyk
"""

0 comments on commit c23aef1

Please sign in to comment.