diff options
Diffstat (limited to 'spec/lib/puppet_spec')
-rw-r--r-- | spec/lib/puppet_spec/files.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb index ebbe1a9..896fdac 100644 --- a/spec/lib/puppet_spec/files.rb +++ b/spec/lib/puppet_spec/files.rb @@ -6,14 +6,14 @@ require 'pathname' # A support module for testing files. module PuppetSpec::Files def self.cleanup - $global_tempfiles ||= [] - while path = $global_tempfiles.pop begin Dir.unstub(:entries) FileUtils.rm_rf path, secure: true rescue Errno::ENOENT # nothing to do end + @global_tempfiles ||= [] + while path = @global_tempfiles.pop end end @@ -92,8 +92,8 @@ module PuppetSpec::Files def record_tmp(tmp) # ...record it for cleanup, - $global_tempfiles ||= [] - $global_tempfiles << tmp + @global_tempfiles ||= [] + @global_tempfiles << tmp end def expect_file_mode(file, mode) |