class Cucumber::Formatter::Summary

Summary formatter, outputting only feature / scenario titles

Public Class Methods

new(config) click to toggle source
# File lib/cucumber/formatter/summary.rb, line 16
def initialize(config)
  @config = config
  @io = ensure_io(config.out_stream, config.error_stream)
  @ast_lookup = AstLookup.new(config)
  @counts = ConsoleCounts.new(@config)
  @issues = ConsoleIssues.new(@config, @ast_lookup)
  @start_time = Time.now

  @config.on_event :test_case_started do |event|
    print_feature event.test_case
    print_test_case event.test_case
  end

  @config.on_event :test_case_finished do |event|
    print_result event.result
  end

  @config.on_event :test_run_finished do |_event|
    duration = Time.now - @start_time
    @io.puts
    print_statistics(duration, @config, @counts, @issues)
  end
end

Private Instance Methods

gherkin_document(uri) click to toggle source
# File lib/cucumber/formatter/summary.rb, line 42
def gherkin_document(uri)
  @ast_lookup.gherkin_document(uri)
end
print_feature(test_case) click to toggle source
print_result(result) click to toggle source
print_test_case(test_case) click to toggle source