lib/minitest-chef-handler.rb in minitest-chef-handler-0.5.0 vs lib/minitest-chef-handler.rb in minitest-chef-handler-0.5.1

- old
+ new

@@ -24,9 +24,15 @@ if custom_runner? runner._run(miniunit_options) else runner.run(miniunit_options) end + + if runner.failures.nonzero? + ::Chef::Client.when_run_completes_successfully do |run_status| + raise "MiniTest failed with #{runner.failures} failure(s)" + end + end end private #