summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-11-13 09:56:32 -0800
committerBryan McLellan <btm@opscode.com>2012-12-24 13:38:38 -0800
commit82ce467ce8a0c9fda23427264a6dd87a40948ff1 (patch)
tree306cc76e7a58e94cfaabab024ca515ccfcf3443c
parent2dab51f2eca4a50eb72872becb00e37a7ba8f7b9 (diff)
downloadchef-82ce467ce8a0c9fda23427264a6dd87a40948ff1.tar.gz
Save @config[:knife] before tests
Stop trampling on the other tests bootstrap.
-rw-r--r--chef/spec/unit/knife/bootstrap_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/chef/spec/unit/knife/bootstrap_spec.rb b/chef/spec/unit/knife/bootstrap_spec.rb
index b2247bb5a4..76261d96ab 100644
--- a/chef/spec/unit/knife/bootstrap_spec.rb
+++ b/chef/spec/unit/knife/bootstrap_spec.rb
@@ -22,6 +22,16 @@ Chef::Knife::Bootstrap.load_deps
require 'net/ssh'
describe Chef::Knife::Bootstrap do
+ before(:all) do
+ @original_config = Chef::Config.hash_dup
+ @original_knife_config = Chef::Config[:knife].dup
+ end
+
+ after(:all) do
+ Chef::Config.configuration = @original_config
+ Chef::Config[:knife] = @original_knife_config
+ end
+
before(:each) do
Chef::Log.logger = Logger.new(StringIO.new)
@knife = Chef::Knife::Bootstrap.new