X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a5336e68a3fb124b6d024ea9b0b9d7bfe88b3b6a..0436b4878ce29c48b690772e61fcaf7aaae8a4ac:/vendor/gems/rspec-1.1.2/lib/spec/runner/formatter/html_formatter.rb diff --git a/vendor/gems/rspec-1.1.2/lib/spec/runner/formatter/html_formatter.rb b/vendor/gems/rspec-1.1.2/lib/spec/runner/formatter/html_formatter.rb deleted file mode 100644 index ad153c8dc..000000000 --- a/vendor/gems/rspec-1.1.2/lib/spec/runner/formatter/html_formatter.rb +++ /dev/null @@ -1,333 +0,0 @@ -require 'erb' -require 'spec/runner/formatter/base_text_formatter' - -module Spec - module Runner - module Formatter - class HtmlFormatter < BaseTextFormatter - include ERB::Util # for the #h method - - def initialize(options, output) - super - @current_example_group_number = 0 - @current_example_number = 0 - end - - # The number of the currently running example_group - def current_example_group_number - @current_example_group_number - end - - # The number of the currently running example (a global counter) - def current_example_number - @current_example_number - end - - def start(example_count) - @example_count = example_count - - @output.puts html_header - @output.puts report_header - @output.flush - end - - def add_example_group(example_group) - super - @example_group_red = false - @example_group_red = false - @current_example_group_number += 1 - unless current_example_group_number == 1 - @output.puts " " - @output.puts "" - end - @output.puts "
#{format_backtrace(failure.exception.backtrace)}
#{@snippet_extractor.snippet(failure.exception)}
"
- end
-
- def move_progress
- @output.puts " "
- @output.flush
- end
-
- def percent_done
- result = 100.0
- if @example_count != 0
- result = ((current_example_number).to_f / @example_count.to_f * 1000).to_i / 10.0
- end
- result
- end
-
- def dump_failure(counter, failure)
- end
-
- def dump_summary(duration, example_count, failure_count, pending_count)
- if dry_run?
- totals = "This was a dry-run"
- else
- totals = "#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}"
- totals << ", #{pending_count} pending" if pending_count > 0
- end
- @output.puts ""
- @output.puts ""
- @output.puts ""
- @output.puts ""
- @output.puts "