The formatter used for --format rerun
This formatter keeps track of all failing features and print out their location. Example:
features/foo.feature:34 features/bar.feature:11:76:81
This formatter is used by AutoTest - it will use the output to decide what to run the next time, simply passing the output string on the command line.
# File lib/cucumber/formatter/rerun.rb, line 18
18: def initialize(step_mother, path_or_io, options)
19: @io = ensure_io(path_or_io, "rerun")
20: @options = options
21: @file_names = []
22: @file_colon_lines = Hash.new{|h,k| h[k] = []}
23: end
# File lib/cucumber/formatter/rerun.rb, line 42
42: def after_feature_element(feature_element)
43: if @rerun
44: file, line = *feature_element.file_colon_line.split(':')
45: @file_colon_lines[file] << line
46: @file_names << file
47: end
48: end
features() is never executed at all... ?
# File lib/cucumber/formatter/rerun.rb, line 26
26: def after_features(features)
27: files = @file_names.uniq.map do |file|
28: lines = @file_colon_lines[file]
29: "#{file}:#{lines.join(':')}"
30: end
31: @io.puts files.join(' ')
32:
33: # Flusing output to rerun tempfile here...
34: @io.flush
35: @io.close
36: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.