aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJorie Tappa <jorie@jorietappa.com>2018-08-01 16:51:24 -0500
committerJorie Tappa <jorie@jorietappa.com>2018-08-01 16:51:24 -0500
commit6e4c49d512272fcfe363867bcc82943168ac0361 (patch)
tree6db34e918186e5963e07202c13f1331e7a18a614 /spec
parentab27f19f5cc54322ec7fe2c4e970f3a54d40881f (diff)
downloadpuppet-cron_core-6e4c49d512272fcfe363867bcc82943168ac0361.tar.gz
puppet-cron_core-6e4c49d512272fcfe363867bcc82943168ac0361.tar.bz2
Fix Lint/AssignmentInCondition violations.
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/puppet_spec/files.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb
index c91f583..f8dde8d 100644
--- a/spec/lib/puppet_spec/files.rb
+++ b/spec/lib/puppet_spec/files.rb
@@ -8,7 +8,7 @@ module PuppetSpec::Files
def self.cleanup
# rubocop:disable Style/GlobalVars
$global_tempfiles ||= []
- while path = $global_tempfiles.pop
+ $global_tempfiles.each do |path|
begin
Dir.unstub(:entries)
FileUtils.rm_rf path, secure: true
@@ -16,6 +16,7 @@ module PuppetSpec::Files
# nothing to do
end
end
+ $global_tempfiles = []
# rubocop:enable Style/GlobalVars
end