1 require File.dirname(__FILE__) + '/spec_helper'
2 require 'spec/runner/formatter/progress_bar_formatter'
4 # Example of a formatter with custom bactrace printing. Run me with:
5 # ruby bin/spec failing_examples -r examples/custom_formatter.rb -f CustomFormatter
6 class CustomFormatter < Spec::Runner::Formatter::ProgressBarFormatter
7 def backtrace_line(line)
8 line.gsub(/([^:]*\.rb):(\d*)/) do
9 "<a href=\"file://#{File.expand_path($1)}\">#{$1}:#{$2}</a> "