Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #76 from pivotal-leopold/master

check for refactored RSpec backtrace formatters and use the new method signature
  • Loading branch information...
commit 7e1b36850c5f38ba1b0e2adf8946b32c4ba71345 2 parents 6b45428 + 3ec35b8
@nicksieger nicksieger authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/ci/reporter/rspec.rb
View
8 lib/ci/reporter/rspec.rb
@@ -75,8 +75,14 @@ def location
output = []
output.push "#{exception.class.name << ":"}" unless exception.class.name =~ /RSpec/
output.push @exception.message
+
+ format_metadata = if defined?(::RSpec::Core::BacktraceFormatter)
+ @example.metadata
+ else
+ @example
+ end
- [@formatter.format_backtrace(@exception.backtrace, @example)].flatten.each do |backtrace_info|
+ [@formatter.format_backtrace(@exception.backtrace, format_metadata)].flatten.each do |backtrace_info|
backtrace_info.lines.each do |line|
output.push " #{line}"
end
Please sign in to comment.
Something went wrong with that request. Please try again.