Skip to content

Commit

Permalink
Features showing issues with exceptions in hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
tooky committed Mar 13, 2015
1 parent 8f7620f commit 6438302
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions features/docs/exception_in_around_hook.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Feature: Exceptions in Around Hooks

Scenario:
Given the standard step definitions
And a file named "features/support/env.rb" with:
"""
Around do |scenario, block|
fail "this should be reported"
block.call
end
"""
And a file named "features/test.feature" with:
"""
Feature: Sample
Scenario: Run a good step
Given this step passes
Scenario: Run a good step
Given this step passes
"""
When I run `cucumber features`
Then it should fail with:
"""
this should be reported
"""
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Handle unexpected response
| ["begin_scenario"] | ["yikes"] |
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
When I run `cucumber -f pretty`
Then the stdout should contain:
Then the output should contain:
"""
undefined method `handle_yikes'
"""

0 comments on commit 6438302

Please sign in to comment.