Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 486 Bytes
require File.dirname(__FILE__) + '/spec_helper'
require 'spec/runner/formatter/progress_bar_formatter'
# Example of a formatter with custom bactrace printing. Run me with:
# ruby bin/spec examples/failing -r examples/passing/custom_formatter.rb -f CustomFormatter
class CustomFormatter < Spec::Runner::Formatter::ProgressBarFormatter
def backtrace_line(line)
line.gsub(/([^:]*\.rb):(\d*)/) do
"<a href=\"file://#{File.expand_path($1)}\">#{$1}:#{$2}</a> "
end
end
end
Something went wrong with that request. Please try again.