changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1require 'spec/runner/formatter/html_formatter'
2
3module Spec
4 module Runner
5 module Formatter
6 # Formats backtraces so they're clickable by TextMate
7 class TextMateFormatter < HtmlFormatter
8 def backtrace_line(line)
9 line.gsub(/([^:]*\.rb):(\d*)/) do
10 "<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
11 end
12 end
13 end
14 end
15 end
16end