summaryrefslogtreecommitdiff
path: root/spec/unit/util
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/util
parent76c9d133b24274f8d03d5ad363ab1a85d13ff5f5 (diff)
downloadchef-04e30daab94a6c1e5c2e28efb3691afdd48ed3f2.tar.gz
Use Chef::Config.reset in tests instead of save/load config
Diffstat (limited to 'spec/unit/util')
-rw-r--r--spec/unit/util/diff_spec.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/unit/util/diff_spec.rb b/spec/unit/util/diff_spec.rb
index ad1166f9fc..ad0ba627d3 100644
--- a/spec/unit/util/diff_spec.rb
+++ b/spec/unit/util/diff_spec.rb
@@ -21,12 +21,13 @@ require 'spec_helper'
require 'tmpdir'
describe Chef::Util::Diff, :uses_diff => true do
- before(:all) do
- @original_config = Chef::Config.hash_dup
+ before :each do
+ Chef::Config.reset
end
- after(:all) do
- Chef::Config.configuration = @original_config if @original_config
+ after :all do
+ # Be a good citizen
+ Chef::Config.reset
end
let!(:old_tempfile) { Tempfile.new("chef-util-diff-spec") }