class RSpec::Core::Formatters::HtmlPrinter

@private

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 9
def initialize(output)
  @output = output
end

Public Instance Methods

flush() click to toggle source
# File lib/rspec/core/formatters/html_printer.rb, line 79
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 96
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 103
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 88
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 92
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 83
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) 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(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 112
def indentation_style(number_of_parents)
  "style=\"margin-left: #{(number_of_parents - 1) * 15}px;\""
end