summaryrefslogtreecommitdiff
path: root/spec/unit/knife/bootstrap_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/knife/bootstrap_spec.rb')
-rw-r--r--spec/unit/knife/bootstrap_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index b2247bb5a4..76261d96ab 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/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