mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +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
|
# Clean up any activated gems
|
||||||
Gem.loaded_specs.delete('inspec-test-fixture')
|
Gem.loaded_specs.delete('inspec-test-fixture')
|
||||||
|
Gem.loaded_specs.delete('ordinal_array')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -194,6 +195,9 @@ class PluginInstallerInstallationTests < Minitest::Test
|
||||||
def test_install_a_gem_with_conflicting_depends_from_rubygems_org
|
def test_install_a_gem_with_conflicting_depends_from_rubygems_org
|
||||||
ENV['INSPEC_CONFIG_DIR'] = File.join(@config_dir_path, 'empty')
|
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
|
ex = assert_raises(Inspec::Plugin::V2::InstallError) do
|
||||||
@installer.install('inspec-test-fixture', version: '= 0.1.1')
|
@installer.install('inspec-test-fixture', version: '= 0.1.1')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue