Parent

Included Modules

Class Index [+]

Quicksearch

Cucumber::Formatter::Rerun

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.

Public Class Methods

new(step_mother, path_or_io, options) click to toggle source
    # 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

Public Instance Methods

after_feature_element(feature_element) click to toggle source
    # 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
after_features(features) click to toggle source

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
before_feature_element(feature_element) click to toggle source
    # File lib/cucumber/formatter/rerun.rb, line 38
38:       def before_feature_element(feature_element)
39:         @rerun = false
40:       end
step_name(keyword, step_match, status, source_indent, background) click to toggle source
    # File lib/cucumber/formatter/rerun.rb, line 50
50:       def step_name(keyword, step_match, status, source_indent, background)
51:         @rerun = true if [:failed, :pending, :undefined].index(status)
52:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.