[DRE-commits] [ruby-rspec-instafail] 15/126: Added backtrace and standardized formatting.
Hideki Yamane
henrich at moszumanska.debian.org
Sun Nov 15 19:14:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository ruby-rspec-instafail.
commit f83137ff257a4c1a75bc8a4cc1cf2e1cbbf80626
Author: Matthew Willhite <matthew.willhite at gmail.com>
Date: Thu Oct 21 12:20:24 2010 -0700
Added backtrace and standardized formatting.
---
lib/rspec/instafail.rb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/rspec/instafail.rb b/lib/rspec/instafail.rb
index 3c7653a..e00ba13 100644
--- a/lib/rspec/instafail.rb
+++ b/lib/rspec/instafail.rb
@@ -19,9 +19,15 @@ module RSpec
def example_failed(example)
@counter ||= 0
@counter += 1
+ exception = example.metadata[:execution_result][:exception_encountered]
+ short_padding = ' '
+ padding = ' '
output.puts
output.puts red("#{@counter}: #{example.example_group.description} #{example.description}")
- output.puts " -> #{example.metadata[:execution_result][:exception_encountered]}"
+ output.puts "#{short_padding}#{exception}"
+ format_backtrace(exception.backtrace, example).each do |backtrace_info|
+ output.puts grey("#{padding}# #{backtrace_info}")
+ end
output.flush
end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec-instafail.git
More information about the Pkg-ruby-extras-commits
mailing list