Class Spec::Runner::Formatter::TextMateFormatter

  1. lib/spec/runner/formatter/text_mate_formatter.rb

Formats backtraces so they’re clickable by TextMate

Methods

public instance

  1. backtrace_line

Public instance methods

backtrace_line (line)
[show source]
# File lib/spec/runner/formatter/text_mate_formatter.rb, line 8
        def backtrace_line(line)
          line.gsub(/([^:]*\.rb):(\d*)/) do
            "<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
          end
        end