aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppet.com>2018-07-09 20:22:33 -0700
committerJosh Cooper <josh@puppet.com>2018-07-10 11:03:14 -0700
commit460e81c81deb278eb9296a1336723ec8a5781b77 (patch)
tree4d2c8f9c1a33980d1bebeef81cbd5ab64374de8e /spec
parent028351553ecfc722330d52dd466113aa4e9c7304 (diff)
downloadpuppet-hosts_core-460e81c81deb278eb9296a1336723ec8a5781b77.tar.gz
puppet-hosts_core-460e81c81deb278eb9296a1336723ec8a5781b77.tar.bz2
Remove Style/GlobalVars violations
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/puppet_spec/files.rb8
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)