class NiceHTMLFormatter

Constants

TEMPLATE

Public Class Methods

new(output) click to toggle source
# File lib/nice_html_formatter.rb, line 20
def initialize(output)
  @passed = []
  @failed = []
  @pending = []

  @output = output
end

Public Instance Methods

close(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 60
def close(notification)
  @output << render
end
dump_failures(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 52
def dump_failures(notification)

end
dump_pending(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 48
def dump_pending(notification)

end
dump_summary(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 56
def dump_summary(notification)
  @summary = notification
end
example_failed(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 40
def example_failed(notification)
  @failed << notification
end
example_group_finished(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 32
def example_group_finished(notification)

end
example_passed(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 36
def example_passed(notification)
  @passed << notification
end
example_pending(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 44
def example_pending(notification)
  @pending << notification
end
example_started(notification) click to toggle source
# File lib/nice_html_formatter.rb, line 28
def example_started(notification)

end

Private Instance Methods

pluralize(count, string) click to toggle source
# File lib/nice_html_formatter.rb, line 70
def pluralize(count, string)
  "#{count} #{string}#{'s' unless count.to_f == 1}"
end
render() click to toggle source
# File lib/nice_html_formatter.rb, line 66
def render
  ERB.new(TEMPLATE).result(binding)
end