mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Fixed two test order dependency bugs.
+ Do extra cleanup of loaded_specs for the dependencies. + Ensure rake is actually activated. Fixes #4030. Fixes #4026. Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
4d4e8e1feb
commit
92d8cd4df9
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,7 @@ module InstallerTestHelpers
|
|||
|
||||
# Clean up any activated gems
|
||||
Gem.loaded_specs.delete('inspec-test-fixture')
|
||||
Gem.loaded_specs.delete('ordinal_array')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -194,6 +195,9 @@ class PluginInstallerInstallationTests < Minitest::Test
|
|||
def test_install_a_gem_with_conflicting_depends_from_rubygems_org
|
||||
ENV['INSPEC_CONFIG_DIR'] = File.join(@config_dir_path, 'empty')
|
||||
|
||||
spec = Gem::Specification._all.find { |s| s.name == "rake" }
|
||||
spec.activate
|
||||
|
||||
ex = assert_raises(Inspec::Plugin::V2::InstallError) do
|
||||
@installer.install('inspec-test-fixture', version: '= 0.1.1')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue