document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\"><\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"># RSpec custom backtrace formatter for jEdit\n");
document.write("# v0.1 \n");
document.write("# by Dave Nolan http://textgoeshere.org.uk\n");
document.write("# licensed under WTFPL http://sam.zoy.org/wtfpl/\n");
document.write("# See http://textgoeshere.org.uk/articles/2008/03/howto-integrate-rspec-on-rails-with-jedit/ for more information\n");
document.write("\n");
document.write("require \'spec/runner/formatter/progress_bar_formatter\'\n");
document.write("\n");
document.write("class JeditFormatter < Spec::Runner::Formatter::ProgressBarFormatter\n");
document.write("  def backtrace_line(line)\n");
document.write("    \"{#{line}}\"\n");
document.write("  end\n");
document.write("\n");
document.write("  def dump_failure(counter, failure)\n");
document.write("    @output.puts\n");
document.write("    @output.puts \"[#{counter.to_s}] \" + colourise(\"#{failure.header}: #{failure.exception.message}\", failure) + \" in \" + format_backtrace(failure.exception.backtrace)\n");
document.write("    @output.flush\n");
document.write("  end\n");
document.write("\n");
document.write("  def format_backtrace(backtrace)\n");
document.write("    return \"\" if backtrace.nil?\n");
document.write("    backtrace.map { |line| backtrace_line(line) }.join(\" ==> \")\n");
document.write("  end\n");
document.write("end<\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/170387.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/170387\">Pastie #170387<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");

