Class: Cucumber::Formatter::Progress

Inherits:
Ast::Visitor show all
Includes:
Console
Defined in:
lib/cucumber/formatter/progress.rb

Overview

The formatter used for --format progress

Direct Known Subclasses

Profile

Constant Summary

Constants included from Console

Console::FORMATS

Constants included from ANSIColor

ANSIColor::ALIASES

Instance Attribute Summary

Attributes inherited from Ast::Visitor

#options, #step_mother

Instance Method Summary collapse

Methods included from Console

#announce, #format_step, #format_string, #print_counts, #print_elements, #print_exception, #print_passing_wip, #print_snippets, #print_stats, #print_steps, #print_tag_limit_warnings, #record_tag_occurrences

Methods included from ANSIColor

define_grey, define_real_grey, #grey

Methods included from Duration

#format_duration

Methods inherited from Ast::Visitor

#announce, #visit_background, #visit_background_name, #visit_comment, #visit_comment_line, #visit_examples, #visit_examples_array, #visit_examples_name, #visit_exception, #visit_feature, #visit_feature_name, #visit_multiline_arg, #visit_outline_table, #visit_py_string, #visit_scenario_name, #visit_step, #visit_step_name, #visit_steps, #visit_table_cell, #visit_table_row, #visit_tag_name, #visit_tags

Constructor Details

#initialize(step_mother, io, options) ⇒ Progress

Returns a new instance of Progress.



9
10
11
12
13
# File 'lib/cucumber/formatter/progress.rb', line 9

def initialize(step_mother, io, options)
  super(step_mother)
  @io = io
  @options = options
end

Instance Method Details

#visit_feature_element(feature_element) ⇒ Object



22
23
24
25
# File 'lib/cucumber/formatter/progress.rb', line 22

def visit_feature_element(feature_element)
  record_tag_occurrences(feature_element, @options)
  super
end

#visit_features(features) ⇒ Object



15
16
17
18
19
20
# File 'lib/cucumber/formatter/progress.rb', line 15

def visit_features(features)
  super
  @io.puts
  @io.puts
  print_summary(features)
end

#visit_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object



27
28
29
30
# File 'lib/cucumber/formatter/progress.rb', line 27

def visit_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
  progress(status)
  @status = status
end

#visit_table_cell_value(value, status) ⇒ Object



32
33
34
35
# File 'lib/cucumber/formatter/progress.rb', line 32

def visit_table_cell_value(value, status)
  status ||= @status
  progress(status) unless table_header_cell?(status)
end