lib/minitest/server_plugin.rb in minitest-server-1.0.5 vs lib/minitest/server_plugin.rb in minitest-server-1.0.6

- old
+ new

@@ -48,27 +48,27 @@ def sanitize failures failures.map! { |e| case e when Minitest::UnexpectedError then # embedded exception might not be able to be marshaled. - bt = e.exception.backtrace + bt = e.error.backtrace - ex = RuntimeError.new(e.exception.message) - e.exception = ex + ex = RuntimeError.new(e.error.message) + e.error = ex ex.set_backtrace bt e = Minitest::UnexpectedError.new ex # ugh. some rails plugin. ugh. if ex.instance_variables.include? :@bindings then # web-console is Evil ex.instance_variable_set :@bindings, nil e.instance_variable_set :@bindings, nil end + when Minitest::Skip then + # do nothing when Minitest::Assertion then bt = e.backtrace e = e.class.new(e.message) e.set_backtrace bt - when Minitest::Skip then - # do nothing else warn "Unhandled exception type: #{e.class}\n\n#{e.inspect}" end e