From ab27f19f5cc54322ec7fe2c4e970f3a54d40881f Mon Sep 17 00:00:00 2001 From: Jorie Tappa Date: Wed, 1 Aug 2018 16:33:33 -0500 Subject: Disable Style/GlobalVars violations --- spec/lib/puppet_spec/files.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'spec/lib') 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) -- cgit v1.2.3