summaryrefslogtreecommitdiff
path: root/spec/unit/mixin/securable_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-09-13 15:25:30 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-09-13 15:25:30 -0700
commit04e30daab94a6c1e5c2e28efb3691afdd48ed3f2 (patch)
treec0ee7b85beb645f30fc6af979b81cf930715367e /spec/unit/mixin/securable_spec.rb
parent76c9d133b24274f8d03d5ad363ab1a85d13ff5f5 (diff)
downloadchef-04e30daab94a6c1e5c2e28efb3691afdd48ed3f2.tar.gz
Use Chef::Config.reset in tests instead of save/load config
Diffstat (limited to 'spec/unit/mixin/securable_spec.rb')
-rw-r--r--spec/unit/mixin/securable_spec.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/unit/mixin/securable_spec.rb b/spec/unit/mixin/securable_spec.rb
index 764da9b1d1..9531a85332 100644
--- a/spec/unit/mixin/securable_spec.rb
+++ b/spec/unit/mixin/securable_spec.rb
@@ -45,7 +45,7 @@ describe Chef::Mixin::Securable do
describe "unix-specific behavior" do
before(:each) do
platform_mock :unix do
- @original_config = Chef::Config.hash_dup
+ Chef::Config.reset
load File.join(File.dirname(__FILE__), "..", "..", "..", "lib", "chef", "config.rb")
load File.join(File.dirname(__FILE__), "..", "..", "..", "lib", "chef", "mixin", "securable.rb")
@securable = Object.new
@@ -55,7 +55,7 @@ describe Chef::Mixin::Securable do
end
after(:each) do
- Chef::Config.configuration = @original_config
+ Chef::Config.reset
end
it "should accept a group name or id for group with spaces and backslashes" do
@@ -120,12 +120,8 @@ describe Chef::Mixin::Securable do
end
end
- after(:all) do
- Chef::Config.configuration = @original_config if @original_config
- end
-
after(:each) do
- Chef::Config.configuration = @original_config if @original_config
+ Chef::Config.reset
end
it "should not accept a group name or id for group with spaces and multiple backslashes" do