diff options
author | Bryan McLellan <btm@opscode.com> | 2012-11-13 09:56:32 -0800 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-11-13 09:56:32 -0800 |
commit | e20f4d327bfef1f14e019f9004975085802f7603 (patch) | |
tree | 06dcce9849620d0133d13a441ee62d6e5f79a51a | |
parent | 439cbdafe569cd7dddc881ef559ecc45e77bd87e (diff) | |
download | chef-e20f4d327bfef1f14e019f9004975085802f7603.tar.gz |
Save @config[:knife] before tests
Stop trampling on the other tests bootstrap.
-rw-r--r-- | chef/spec/unit/knife/bootstrap_spec.rb | 10 |
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 |