Class: Cucumber::Formatter::Progress

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

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_snippets, #print_steps

Methods included from ANSIColor

#grey

Methods inherited from Ast::Visitor

#announce, #matches_scenario_names?, #visit_background, #visit_background_name, #visit_comment, #visit_comment_line, #visit_examples, #visit_examples_name, #visit_exception, #visit_feature, #visit_feature_element, #visit_feature_name, #visit_outline_table, #visit_py_string, #visit_scenario_name, #visit_step, #visit_step_result, #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.



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

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

Instance Method Details

#visit_features(features) ⇒ Object



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

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

#visit_multiline_arg(multiline_arg) ⇒ Object



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

def visit_multiline_arg(multiline_arg)
  @multiline_arg = true
  super
  @multiline_arg = false
end

#visit_step_name(keyword, step_match, status, source_indent, background) ⇒ Object



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

def visit_step_name(keyword, step_match, status, source_indent, background)
  progress(status) unless status == :outline
end

#visit_table_cell_value(value, width, status) ⇒ Object



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

def visit_table_cell_value(value, width, status)
  progress(status) if (status != :thead) && !@multiline_arg
end