require 'mspec/expectations/expectations' require 'mspec/runner/formatters/dotted' class HtmlFormatter < DottedFormatter def register super MSpec.register :start, self MSpec.register :enter, self MSpec.register :leave, self end def start print <<-EOH
#{describe}
\n#{escape(exc.description)} #{outcome}
\n] print escape(exc.message) print "
\n\n" print escape(exc.backtrace) print "\n
#{@timer.format}
\n] print %[#{@tally.format}
\n] print "\n\n" end def escape(string) string.gsub("&", " ").gsub("<", "<").gsub(">", ">") end end