# -*- coding: utf-8 -*-
require 'erb'
require 'rspec/core/formatters/snippet_extractor'
module TurnipFormatter
class Template
include ERB::Util
include RSpec::Core::BacktraceFormatter
def print_header
<<-EOS
#{report_area}
EOS
end
def print_footer(total_count, failed_count, pending_count, total_time)
update_report_js_tmp = ''
update_report_js = ''
%w{ total_count failed_count pending_count total_time }.each do |key|
update_report_js += update_report_js_tmp % [key, eval(key)]
end
<<-EOS
#{update_report_js}