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/unit/encrypted_data_bag_item_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/unit/encrypted_data_bag_item_spec.rb')
-rw-r--r-- | spec/unit/encrypted_data_bag_item_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/encrypted_data_bag_item_spec.rb b/spec/unit/encrypted_data_bag_item_spec.rb index 9eda1633ab..8b123d23a3 100644 --- a/spec/unit/encrypted_data_bag_item_spec.rb +++ b/spec/unit/encrypted_data_bag_item_spec.rb @@ -74,12 +74,12 @@ describe Chef::EncryptedDataBagItem::Encryptor do describe "when using version 2 format" do before do - @original_config = Chef::Config.hash_dup + Chef::Config.reset Chef::Config[:data_bag_encrypt_version] = 2 end after do - Chef::Config.configuration = @original_config + Chef::Config.reset end it "creates a version 2 encryptor" do @@ -179,12 +179,12 @@ describe Chef::EncryptedDataBagItem::Decryptor do context "and version 2 format is required" do before do - @original_config = Chef::Config.hash_dup + Chef::Config.reset Chef::Config[:data_bag_decrypt_minimum_version] = 2 end after do - Chef::Config.configuration = @original_config + Chef::Config.reset end it "raises an error attempting to decrypt" do @@ -210,12 +210,12 @@ describe Chef::EncryptedDataBagItem::Decryptor do context "and version 1 format is required" do before do - @original_config = Chef::Config.hash_dup + Chef::Config.reset Chef::Config[:data_bag_decrypt_minimum_version] = 1 end after do - Chef::Config.configuration = @original_config + Chef::Config.reset end it "raises an error attempting to decrypt" do |