Sha256: 57e72298f58a04351e7c5ee1e9d41b09b8815414ba1434888a49802349e7f0ef

Contents?: true

Size: 430 Bytes

Versions: 26

Compression:

Stored size: 430 Bytes

Contents

require 'spec/runner/formatter/progress_bar_formatter'

# Example of a formatter with custom bactrace printing. Run me with:
# ruby bin/spec failing_examples -r examples/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

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/examples/custom_formatter.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/examples/custom_formatter.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/examples/custom_formatter.rb
riess-0.0.8 vendor/rspec-0.8.2/examples/custom_formatter.rb
rspec-0.7.4 examples/custom_formatter.rb
rspec-0.7.5 examples/custom_formatter.rb
rspec-0.7.5.1 examples/custom_formatter.rb
rspec-0.8.0 examples/custom_formatter.rb
rspec-0.8.1 examples/custom_formatter.rb
rspec-0.7.2 examples/custom_formatter.rb
rspec-0.7.3 examples/custom_formatter.rb
rspec-1.0.5 examples/custom_formatter.rb
rspec-0.8.2 examples/custom_formatter.rb
rspec-0.9.0 examples/custom_formatter.rb
rspec-0.9.1 examples/custom_formatter.rb
rspec-0.9.2 examples/custom_formatter.rb
rspec-0.9.3 examples/custom_formatter.rb
rspec-0.9.4 examples/custom_formatter.rb
rspec-1.0.0 examples/custom_formatter.rb
rspec-1.0.1 examples/custom_formatter.rb