lib/cucumber/formatter/rerun.rb in aslakhellesoy-cucumber-0.1.99.23 vs lib/cucumber/formatter/rerun.rb in aslakhellesoy-cucumber-0.1.100.1

- old
+ new

@@ -3,32 +3,32 @@ class Rerun < Ast::Visitor def initialize(step_mother, io, options) super(step_mother) @io = io @file_names = [] - @file_lines = Hash.new{|h,k| h[k] = []} + @file_colon_lines = Hash.new{|h,k| h[k] = []} end def visit_features(features) super files = @file_names.uniq.map do |file| - lines = @file_lines[file] + lines = @file_colon_lines[file] "#{file}:#{lines.join(':')}" end @io.puts files.join(' ') end def visit_feature_element(feature_element) @rerun = false super if @rerun - file, line = *feature_element.file_line.split(':') - @file_lines[file] << line + file, line = *feature_element.file_colon_line.split(':') + @file_colon_lines[file] << line @file_names << file end end - def visit_step_name(keyword, step_name, status, step_definition, source_indent) + def visit_step_name(keyword, step_match, status, source_indent) @rerun = true if [:failed].index(status) end end end end \ No newline at end of file