Skip to content

Commit

Permalink
Previously a feature element would only be retried if a step raised a…
Browse files Browse the repository at this point in the history
…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 d4eceff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/rerun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def before_feature_element(feature_element)
end

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
Expand Down

0 comments on commit d4eceff

Please sign in to comment.