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