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_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.



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_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object



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

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

#visit_table_cell_value(value, width, status) ⇒ Object



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

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