lib/minitest-chef-handler.rb in minitest-chef-handler-0.6.8 vs lib/minitest-chef-handler.rb in minitest-chef-handler-0.6.9

- old
+ new

@@ -39,10 +39,10 @@ runner._run(miniunit_options) else runner.run(miniunit_options) end - if result.nonzero? + if result && result.nonzero? ::Chef::Client.when_run_completes_successfully do |run_status| 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