aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/lib/puppet_spec/files.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb
index ebbe1a9..c91f583 100644
--- a/spec/lib/puppet_spec/files.rb
+++ b/spec/lib/puppet_spec/files.rb
@@ -6,6 +6,7 @@ require 'pathname'
# A support module for testing files.
module PuppetSpec::Files
def self.cleanup
+ # rubocop:disable Style/GlobalVars
$global_tempfiles ||= []
while path = $global_tempfiles.pop
begin
@@ -15,6 +16,7 @@ module PuppetSpec::Files
# nothing to do
end
end
+ # rubocop:enable Style/GlobalVars
end
module_function
@@ -91,9 +93,10 @@ module PuppetSpec::Files
end
def record_tmp(tmp)
- # ...record it for cleanup,
+ # rubocop:disable Style/GlobalVars
$global_tempfiles ||= []
$global_tempfiles << tmp
+ # rubocop:enable Style/GlobalVars
end
def expect_file_mode(file, mode)