Browse files

Previously a feature element would only be retried if a step raised a…

…n exception. However feature elements can fail in before blocks as well. We should therefore check both the steps and the feature element's status to appropriately mark it for retry.
  • Loading branch information...
charleseff committed Nov 11, 2011
1 parent a8d9336 commit d4eceff612559cc08c0bb0a959709d77755fc016
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cucumber/formatter/rerun.rb
@@ -46,7 +46,7 @@ def before_feature_element(feature_element)
def after_feature_element(feature_element)
- if @rerun
+ if @rerun || feature_element.failed?
file, line = *feature_element.file_colon_line.split(':')
@lines << line
@file = file

0 comments on commit d4eceff

Please sign in to comment.