Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 856348319ab64aac5890e2f233d650d9c5359f50 1 parent 1863a2a
@alexcrichton alexcrichton authored dchelimsky committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rspec/core/formatters/text_mate_formatter.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.