diff options
Diffstat (limited to 'lib/test')
-rw-r--r-- | lib/test/unit.rb | 9 | ||||
-rw-r--r-- | lib/test/unit/parallel.rb | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index a0902acb8b..c29facca71 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -824,6 +824,15 @@ module Test new(*args).run end end + + class ProxyError < StandardError + def initialize(ex) + @message = ex.message + @backtrace = ex.backtrace + end + + attr_accessor :message, :backtrace + end end end diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb index 32f15382ec..921c6b0b02 100644 --- a/lib/test/unit/parallel.rb +++ b/lib/test/unit/parallel.rb @@ -155,7 +155,7 @@ module Test end def puke(klass, meth, e) - @partial_report << [klass.name, meth, e] + @partial_report << [klass.name, meth, e.is_a?(MiniTest::Assertion) ? e : ProxyError.new(e)] super end end |