lib/minitest-chef-handler.rb in minitest-chef-handler-0.3.0 vs lib/minitest-chef-handler.rb in minitest-chef-handler-0.4.0
- old
+ new
@@ -1,7 +1,14 @@
-require 'minitest/unit'
+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/assertions'
+require 'minitest-chef-handler/infections'
+
module MiniTest
module Chef
class Handler < ::Chef::Handler
def initialize(options = {})
path = options.delete(:path) || './test/test_*.rb'
@@ -38,31 +45,9 @@
#
# Using this workaround we still allow to use any other runner with the test suite for versions greater than 2.1.0.
# If the test suite doesn't use any chef injection capability it still can be ran with the default Minitest runner.
def custom_runner?
Gem::Version.new(MiniTest::Unit::VERSION) >= Gem::Version.new('2.1.0')
- end
- end
-
- class Runner < MiniTest::Unit
- attr_reader :run_status
-
- def initialize(run_status)
- @run_status = run_status
- super()
- end
- end
-
- class TestCase < MiniTest::Unit::TestCase
- attr_reader :run_status, :node, :run_context
-
- def run(runner)
- if runner.respond_to?(:run_status)
- @run_status = runner.run_status
- @node = @run_status.node
- @run_context = @run_status.run_context
- end
- super(runner)
end
end
end
end