Merge pull request #4884 from inspec/zenspider/mocha/quiet

Please stop warning about mocha.
This commit is contained in:
Ryan Davis 2020-02-04 12:59:47 -08:00 committed by GitHub
commit ee2401cb13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -17,7 +17,12 @@ module InstallerTestHelpers
def reset_globals
ENV["HOME"] = @@orig_home
ENV["INSPEC_CONFIG_DIR"] = nil
@installer.__reset
@installer && @installer.__reset
if defined?(::InspecPlugins::TestFixture)
InspecPlugins.send :remove_const, :TestFixture
end
# forget all test fixture files
$".reject! { |path| path =~ %r{test/fixtures} }
end
def copy_in_config_dir(fixture_name)
@ -513,6 +518,8 @@ class PluginInstallerSearchTests < Minitest::Test
end
def test_search_omits_inspec_gem_on_the_reject_list
skip_slow_tests
results = @installer.search("inspec-")
assert results.key?("inspec-test-fixture")

View file

@ -17,6 +17,11 @@ class PluginLoaderTests < Minitest::Test
ENV["HOME"] = @@orig_home
ENV["INSPEC_CONFIG_DIR"] = nil
Inspec::Plugin::V2::Registry.instance.__reset
if defined?(::InspecPlugins::TestFixture)
InspecPlugins.send :remove_const, :TestFixture
end
# forget all test fixture files
$".reject! { |path| path =~ %r{test/fixtures} }
end
def setup

View file

@ -1,7 +1,6 @@
#
require "helper"
require "rbconfig"
require "mocha/test_unit"
require "inspec/shell_detector"
module ShellDetectorTestHelpers