Class: Cucumber::Formatter::Progress

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

Overview

The formatter used for --format progress

Direct Known Subclasses

Usage

Constant Summary

Constants included from Console

Console::FORMATS

Constants included from ANSIColor

ANSIColor::ALIASES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Io

#ensure_dir, #ensure_file, #ensure_io

Methods included from Console

#announce, #embed, #empty_announcements, #format_step, #format_string, #print_announcement, #print_announcements, #print_counts, #print_elements, #print_exception, #print_passing_wip, #print_snippets, #print_stats, #print_steps, #print_table_row_announcements, #print_tag_limit_warnings

Methods included from ANSIColor

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

Methods included from Summary

#scenario_summary, #step_summary

Methods included from Duration

#format_duration

Constructor Details

#initialize(step_mother, path_or_io, options) ⇒ Progress

Returns a new instance of Progress.



12
13
14
# File 'lib/cucumber/formatter/progress.rb', line 12

def initialize(step_mother, path_or_io, options)
  @step_mother, @io, @options = step_mother, ensure_io(path_or_io, "progress"), options
end

Instance Attribute Details

#step_motherObject (readonly)

Returns the value of attribute step_mother.



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

def step_mother
  @step_mother
end

Instance Method Details

#after_features(features) ⇒ Object



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

def after_features(features)
  @io.puts
  @io.puts
  print_summary(features)
end

#after_outline_table(outline_table) ⇒ Object



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

def after_outline_table(outline_table)
  @outline_table = nil
end

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



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

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

#before_outline_table(outline_table) ⇒ Object



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

def before_outline_table(outline_table)
  @outline_table = outline_table
end

#table_cell_value(value, status) ⇒ Object



35
36
37
38
39
# File 'lib/cucumber/formatter/progress.rb', line 35

def table_cell_value(value, status)
  return unless @outline_table
  status ||= @status
  progress(status) unless table_header_cell?(status)
end