lib/minitest-chef-handler.rb in minitest-chef-handler-0.6.4 vs lib/minitest-chef-handler.rb in minitest-chef-handler-0.6.5
- old
+ new
@@ -41,10 +41,12 @@
runner.run(miniunit_options)
end
if runner.failures.nonzero? || runner.errors.nonzero?
::Chef::Client.when_run_completes_successfully do |run_status|
- raise "MiniTest failed with #{runner.failures} failure(s) and #{runner.errors} error(s)."
+ error_msg = "MiniTest failed with #{runner.failures} failure(s) and #{runner.errors} error(s).\n"
+ error_msg << runner.report.sort.join("\n")
+ raise error_msg
end
end
end
def miniunit_options