diff options
author | John Keiser <jkeiser@opscode.com> | 2013-09-13 15:25:30 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-09-13 15:25:30 -0700 |
commit | 04e30daab94a6c1e5c2e28efb3691afdd48ed3f2 (patch) | |
tree | c0ee7b85beb645f30fc6af979b81cf930715367e /spec/functional/resource/package_spec.rb | |
parent | 76c9d133b24274f8d03d5ad363ab1a85d13ff5f5 (diff) | |
download | chef-04e30daab94a6c1e5c2e28efb3691afdd48ed3f2.tar.gz |
Use Chef::Config.reset in tests instead of save/load config
Diffstat (limited to 'spec/functional/resource/package_spec.rb')
-rw-r--r-- | spec/functional/resource/package_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/functional/resource/package_spec.rb b/spec/functional/resource/package_spec.rb index 24ad96d135..cc416e9a23 100644 --- a/spec/functional/resource/package_spec.rb +++ b/spec/functional/resource/package_spec.rb @@ -202,7 +202,7 @@ describe Chef::Resource::Package, metadata do let(:file_cache_path) { Dir.mktmpdir } before do - @old_config = Chef::Config.configuration.dup + Chef::Config.reset Chef::Config[:file_cache_path] = file_cache_path debconf_reset = 'chef-integration-test chef-integration-test/sample-var string "INVALID"' shell_out!("echo #{debconf_reset} |debconf-set-selections") @@ -210,7 +210,11 @@ describe Chef::Resource::Package, metadata do after do FileUtils.rm_rf(file_cache_path) - Chef::Config.configuration = @old_config + end + + after :all do + # Be a good citizen + Chef::Config.reset end context "with a preseed file" do |