]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/examples/pure/custom_formatter.rb
fix node relations bug (thanks Dave!)
[rails.git] / vendor / gems / rspec-1.1.2 / examples / pure / custom_formatter.rb
1 require File.dirname(__FILE__) + '/spec_helper'
2 require 'spec/runner/formatter/progress_bar_formatter'
3
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> "
10     end
11   end
12 end