Permalink
Browse files

Support stack traces with erb files in them and also show all lines f…

…rom stack trace even when it's not a ruby file. Just don't link files which aren't ruby files.

- Closes #155.
  • Loading branch information...
1 parent 1863a2a commit 856348319ab64aac5890e2f233d650d9c5359f50 @alexcrichton alexcrichton committed with dchelimsky Sep 23, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rspec/core/formatters/text_mate_formatter.rb
@@ -7,9 +7,11 @@ module Formatters
class TextMateFormatter < HtmlFormatter
def backtrace_line(line)
if line = super(line)
- line.sub!(/([^:]*\.rb):(\d*)/) do
+ line.sub!(/([^:]*\.e?rb):(\d*)/) do
"<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
end
+
+ line
end
end
end

0 comments on commit 8563483

Please sign in to comment.