summaryrefslogtreecommitdiff
path: root/spec/support/shared/integration/integration_helper.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2013-01-03 11:46:58 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:14 -0700
commitf4b025225e3fcc2cf94dc561b24a5681fd6d4c5a (patch)
tree7a5fca43f3fdc1be0b1426c28dc2f0f618ab8c18 /spec/support/shared/integration/integration_helper.rb
parentbf10554375067d2c55213337401a3af1a1dccedd (diff)
downloadchef-f4b025225e3fcc2cf94dc561b24a5681fd6d4c5a.tar.gz
Don't display/diff empty/ignored cookbook directories
Also, add many chefignore tests
Diffstat (limited to 'spec/support/shared/integration/integration_helper.rb')
-rw-r--r--spec/support/shared/integration/integration_helper.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb
index fcbacf7c8f..fde763c5e4 100644
--- a/spec/support/shared/integration/integration_helper.rb
+++ b/spec/support/shared/integration/integration_helper.rb
@@ -40,13 +40,15 @@ module IntegrationSupport
after :each do
if @repository_dir
- Chef::Config.chef_repo_path = @old_chef_repo_path
- Chef::Config.cookbook_path = @old_cookbook_path
- FileUtils.remove_entry_secure(@repository_dir)
-
- @old_chef_repo_path = nil
- @old_cookbook_path = nil
- @repository_dir = nil
+ begin
+ Chef::Config.chef_repo_path = @old_chef_repo_path
+ Chef::Config.cookbook_path = @old_cookbook_path
+ FileUtils.remove_entry_secure(@repository_dir)
+ ensure
+ @old_chef_repo_path = nil
+ @old_cookbook_path = nil
+ @repository_dir = nil
+ end
end
end