Class: Cucumber::Formatter::ConsoleCounts

Inherits:
Object
  • Object
show all
Includes:
Console
Defined in:
lib/cucumber/formatter/console_counts.rb

Constant Summary

Constants included from ANSIColor

ANSIColor::ALIASES

Constants included from Term::ANSIColor

Term::ANSIColor::ATTRIBUTES, Term::ANSIColor::ATTRIBUTE_NAMES, Term::ANSIColor::COLORED_REGEXP

Instance Method Summary collapse

Methods included from Console

#collect_snippet_data, #do_print_passing_wip, #do_print_profile_information, #do_print_snippets, #embed, #empty_messages, #exception_message_string, #format_step, #format_string, #linebreaks, #print_element_messages, #print_elements, #print_exception, #print_message, #print_messages, #print_passing_wip, #print_profile_information, #print_snippets, #print_statistics, #print_steps, #print_table_row_messages, #puts

Methods included from ANSIColor

#cukes, define_grey, define_real_grey, #green_cukes, #red_cukes, #yellow_cukes

Methods included from Term::ANSIColor

attributes, coloring=, coloring?, included, #uncolored

Methods included from Duration

#format_duration

Constructor Details

#initialize(config) ⇒ ConsoleCounts

Returns a new instance of ConsoleCounts



8
9
10
# File 'lib/cucumber/formatter/console_counts.rb', line 8

def initialize(config)
  @summary = Core::Report::Summary.new(config.event_bus)
end

Instance Method Details

#to_sObject



12
13
14
15
16
17
# File 'lib/cucumber/formatter/console_counts.rb', line 12

def to_s
  [
    [scenario_count, status_counts(@summary.test_cases)].compact.join(' '),
    [step_count, status_counts(@summary.test_steps)].compact.join(' ')
  ].join("\n")
end