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

Instance Method Summary collapse

Methods included from Console

#format_step, #format_string, #print_counts, #print_elements, #print_exception, #print_snippets, #print_steps, #print_undefined_scenarios

Methods included from ANSIColor

#grey

Methods inherited from Ast::Visitor

#current_feature_lines, #current_feature_lines=, #step_definition, #visit_comment, #visit_comment_line, #visit_examples, #visit_examples_name, #visit_feature, #visit_feature_name, #visit_py_string, #visit_scenario_name, #visit_step, #visit_table_cell, #visit_table_row, #visit_tag_name, #visit_tags, #world

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_feature_element(feature_element) ⇒ Object



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

def visit_feature_element(feature_element)
  progress(:undefined) if feature_element.undefined?
  super
end

#visit_features(features) ⇒ Object



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

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

#visit_multiline_arg(multiline_arg, status) ⇒ Object



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

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

#visit_step_name(keyword, step_name, status, step_definition, source_indent) ⇒ Object



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

def visit_step_name(keyword, step_name, status, step_definition, source_indent)
  progress(status) unless status == :outline
end

#visit_table_cell_value(value, width, status) ⇒ Object



38
39
40
# File 'lib/cucumber/formatter/progress.rb', line 38

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