Class: Cucumber::Formatter::HTML

Inherits:
MessageBuilder show all
Defined in:
lib/cucumber/formatter/html.rb

Constant Summary

Constants included from ANSIColor

ANSIColor::ALIASES

Constants included from Term::ANSIColor

Term::ANSIColor::ATTRIBUTES, Term::ANSIColor::ATTRIBUTE_NAMES, Term::ANSIColor::COLORED_REGEXP

Instance Method Summary collapse

Methods inherited from MessageBuilder

#attach, #on_envelope

Methods included from Console

#attach, #collect_snippet_data, #collect_undefined_parameter_type_names, #do_print_passing_wip, #do_print_profile_information, #do_print_snippets, #do_print_undefined_parameter_type_snippet, #exception_message_string, #format_step, #format_string, #indent, #linebreaks, #print_element_messages, #print_elements, #print_exception, #print_passing_wip, #print_profile_information, #print_snippets, #print_statistics

Methods included from ANSIColor

apply_custom_colors, #cukes, #green_cukes, #red_cukes, #yellow_cukes

Methods included from Term::ANSIColor

#attributes, included, #uncolored

Methods included from Duration

#format_duration

Methods included from Io

ensure_dir, ensure_file, ensure_io, included, io?, url?

Constructor Details

#initialize(config) ⇒ HTML

Returns a new instance of HTML.



10
11
12
13
14
15
# File 'lib/cucumber/formatter/html.rb', line 10

def initialize(config)
  @io = ensure_io(config.out_stream, config.error_stream)
  @html_formatter = Cucumber::HTMLFormatter::Formatter.new(@io)
  @html_formatter.write_pre_message
  super(config)
end

Instance Method Details

#output_envelope(envelope) ⇒ Object



17
18
19
20
21
# File 'lib/cucumber/formatter/html.rb', line 17

def output_envelope(envelope)
  @repository.update(envelope)
  @html_formatter.write_message(envelope)
  @html_formatter.write_post_message if envelope.test_run_finished
end