[DRE-commits] [ruby-rspec-instafail] 56/126: Output original_exception

Hideki Yamane henrich at moszumanska.debian.org
Sun Nov 15 19:15:10 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 f7d6b7b8936ac1ed62345c0a0656e8b951a36a7d
Author: Raphael Sofaer <raphael at joindiaspora.com>
Date:   Thu Mar 3 10:45:04 2011 -0800

    Output original_exception
---
 lib/rspec/instafail/rspec_2.rb | 3 +++
 spec/instafail_spec.rb         | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/rspec/instafail/rspec_2.rb b/lib/rspec/instafail/rspec_2.rb
index f0f444b..ab80463 100644
--- a/lib/rspec/instafail/rspec_2.rb
+++ b/lib/rspec/instafail/rspec_2.rb
@@ -15,6 +15,9 @@ module RSpec
       output.puts "#{short_padding}#{@counter}) #{example.full_description}"
       output.puts "#{padding}#{red("Failure/Error:")} #{red(read_failed_line(exception, example).strip)}"
       output.puts "#{padding}#{red(exception)}"
+      if exception.respond_to?(:original_exception)
+        output.puts "#{padding}#{red(exception.original_exception)}"
+      end
       format_backtrace(exception.backtrace, example).each do |backtrace_info|
         output.puts grey("#{padding}# #{backtrace_info}")
       end
diff --git a/spec/instafail_spec.rb b/spec/instafail_spec.rb
index d68db16..267b03d 100644
--- a/spec/instafail_spec.rb
+++ b/spec/instafail_spec.rb
@@ -57,7 +57,8 @@ EXP
       expected = <<EXP
   3\\) x raises a hidden error
      Failure\\/Error: raise error
-     There is an error in this error.
+     There is an error in this error\\.
+     There is no error in this error\\.
 EXP
       @output.should =~ Regexp.new(expected, 'x')
     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