lib/minitest-chef-handler.rb in minitest-chef-handler-0.5.4 vs lib/minitest-chef-handler.rb in minitest-chef-handler-0.6.0

- old
+ new

@@ -1,10 +1,11 @@ require 'minitest-chef-handler/context' require 'minitest-chef-handler/resources' require 'minitest-chef-handler/unit' require 'minitest-chef-handler/spec' require 'minitest-chef-handler/runner' +require 'minitest-chef-handler/ci_runner' require 'minitest-chef-handler/assertions' require 'minitest-chef-handler/infections' require 'minitest-chef-handler/lookup' @@ -21,10 +22,16 @@ def report # do not run tests if chef failed return if failed? require_test_suites(@options.delete(:path)) - runner = Runner.new(run_status) + + if @options[:ci_reports] + ENV['CI_REPORTS'] = @options[:ci_reports] + runner = CIRunner.new(run_status) + else + runner = Runner.new(run_status) + end if custom_runner? runner._run(miniunit_options) else runner.run(miniunit_options)