From 5f97412d3bbb80870d5194d5c5b04bc6643daa8b Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Jul 2018 20:25:14 -0700 Subject: Remove Lint/HandleExceptions violations --- spec/lib/puppet_spec/files.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'spec/lib/puppet_spec') diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb index 896fdac..08699f6 100644 --- a/spec/lib/puppet_spec/files.rb +++ b/spec/lib/puppet_spec/files.rb @@ -6,14 +6,10 @@ require 'pathname' # A support module for testing files. module PuppetSpec::Files def self.cleanup - begin - Dir.unstub(:entries) - FileUtils.rm_rf path, secure: true - rescue Errno::ENOENT - # nothing to do - end @global_tempfiles ||= [] while path = @global_tempfiles.pop + Dir.unstub(:entries) + FileUtils.rm_rf path, secure: true end end -- cgit v1.2.3