From 04e30daab94a6c1e5c2e28efb3691afdd48ed3f2 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Fri, 13 Sep 2013 15:25:30 -0700 Subject: Use Chef::Config.reset in tests instead of save/load config --- spec/unit/knife_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec/unit/knife_spec.rb') diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb index 4c5bb3e207..422466aae9 100644 --- a/spec/unit/knife_spec.rb +++ b/spec/unit/knife_spec.rb @@ -25,6 +25,7 @@ require 'spec_helper' describe Chef::Knife do before(:each) do + Chef::Config.reset Chef::Log.logger = Logger.new(StringIO.new) Chef::Config[:node_name] = "webmonkey.example.com" @@ -203,7 +204,6 @@ describe Chef::Knife do KnifeSpecs::TestYourself.option(:opt_with_default, :short => "-D VALUE", :default => "default-value") - Chef::Config[:knife] = {} end it "prefers the default value if no config or command line value is present" do @@ -227,7 +227,6 @@ describe Chef::Knife do end end - end describe "when first created" do -- cgit v1.2.1