Skip to content
This repository
Browse code

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
Alex Crichton alexcrichton authored dchelimsky committed

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 lib/rspec/core/formatters/text_mate_formatter.rb
4 lib/rspec/core/formatters/text_mate_formatter.rb
@@ -7,9 +7,11 @@ module Formatters
7 7 class TextMateFormatter < HtmlFormatter
8 8 def backtrace_line(line)
9 9 if line = super(line)
10   - line.sub!(/([^:]*\.rb):(\d*)/) do
  10 + line.sub!(/([^:]*\.e?rb):(\d*)/) do
11 11 "<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
12 12 end
  13 +
  14 + line
13 15 end
14 16 end
15 17 end

0 comments on commit 8563483

Please sign in to comment.
Something went wrong with that request. Please try again.