class RSpec::Core::Formatters::HtmlPrinter

Constants

GLOBAL_SCRIPTS
GLOBAL_STYLES
HTML_HEADER
REPORT_HEADER

Public Class Methods

new(output) click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 8
def initialize(output)
  @output = output
end

Public Instance Methods

flush() click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 77
def flush
  @output.flush
end
make_example_group_header_red(group_id) click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 94
def make_example_group_header_red(group_id)
  @output.puts "    <script type=\"text/javascript\">makeRed('div_group_#{group_id}');</script>"
  @output.puts "    <script type=\"text/javascript\">makeRed('example_group_#{group_id}');</script>"
end
make_example_group_header_yellow(group_id) click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 99
def make_example_group_header_yellow(group_id)
  @output.puts "    <script type=\"text/javascript\">makeYellow('div_group_#{group_id}');</script>"
  @output.puts "    <script type=\"text/javascript\">makeYellow('example_group_#{group_id}');</script>"
end
make_header_red() click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 86
def make_header_red
  @output.puts "    <script type=\"text/javascript\">makeRed('rspec-header');</script>"
end
make_header_yellow() click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 90
def make_header_yellow
  @output.puts "    <script type=\"text/javascript\">makeYellow('rspec-header');</script>"
end
move_progress( percent_done ) click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 81
def move_progress( percent_done )
  @output.puts "    <script type=\"text/javascript\">moveProgressBar('#{percent_done}');</script>"
  @output.flush
end
print_example_failed( pending_fixed, description, run_time, failure_id, exception, extra_content, escape_backtrace = false ) click to toggle source
print_example_group_end() click to toggle source
print_example_group_start( group_id, description, number_of_parents ) click to toggle source
print_example_passed( description, run_time ) click to toggle source
print_example_pending( description, pending_message ) click to toggle source
print_html_start() click to toggle source
print_summary( was_dry_run, duration, example_count, failure_count, pending_count ) click to toggle source

Private Instance Methods

indentation_style( number_of_parents ) click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 107
def indentation_style( number_of_parents )
  "style=\"margin-left: #{(number_of_parents - 1) * 15}px;\""
end