class Cucumber::Formatter::Rerun


to run the next time, simply passing the output string on the command line.
This formatter is used by AutoTest - it will use the output to decide what
features/foo.feature:34 features/bar.feature:11:76:81
Example:
This formatter keeps track of all failing features and print out their location.
The formatter used for --format rerun

def after_feature_element(feature_element)

feature_element() is never executed at all, either... ?
def after_feature_element(feature_element)
  if feature_element.failed?
    file, line = *feature_element.file_colon_line.split(':')
    @file_colon_lines[file] << line
    @file_names << file
  end
end

def after_features(features)

features() is never executed at all... ?
def after_features(features)
  files = @file_names.uniq.map do |file|
    lines = @file_colon_lines[file]
    "#{file}:#{lines.join(':')}"
  end
  @io.puts files.join(' ')
  
  # Flusing output to rerun tempfile here...
  @io.flush
  @io.close
end

def initialize(step_mother, io, options)

def initialize(step_mother, io, options)
  @io = io
  @options = options
  @file_names = []
  @file_colon_lines = Hash.new{|h,k| h[k] = []}
end

def step_name(keyword, step_match, status, source_indent, background)

def step_name(keyword, step_match, status, source_indent, background)
  @rerun = true if [:failed].index(status)
end