From d4eceff612559cc08c0bb0a959709d77755fc016 Mon Sep 17 00:00:00 2001 From: Charles Finkel Date: Thu, 10 Nov 2011 16:16:37 -0800 Subject: [PATCH] Previously a feature element would only be retried if a step raised an 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. --- lib/cucumber/formatter/rerun.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cucumber/formatter/rerun.rb b/lib/cucumber/formatter/rerun.rb index 24b853ff41..a54dd254c1 100644 --- a/lib/cucumber/formatter/rerun.rb +++ b/lib/cucumber/formatter/rerun.rb @@ -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