Sha256: e63853af85ca375733e4a9cf8c76af30426d6cf5163de125055fb3889ee8d150

Contents?: true

Size: 487 Bytes

Versions: 19

Compression:

Stored size: 487 Bytes

Contents

require 'rspec/core/formatters/html_formatter'

module RSpec
  module Core
    module Formatters
      # Formats backtraces so they're clickable by TextMate
      class TextMateFormatter < HtmlFormatter
        def backtrace_line(line)
          if line = super(line)
            line.sub!(/([^:]*\.rb):(\d*)/) do
              "<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
            end
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0 lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.rc lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.beta.22 lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.beta.20 lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.beta.19 lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.beta.18 lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.beta.17 lib/rspec/core/formatters/text_mate_formatter.rb
rspec-core-2.0.0.beta.16 lib/rspec/core/formatters/text_mate_formatter.rb