diff options
author | Michael Hashizume <michael.hashizume@puppet.com> | 2023-02-10 10:45:29 -0800 |
---|---|---|
committer | Michael Hashizume <michael.hashizume@puppet.com> | 2023-02-10 10:45:29 -0800 |
commit | cf562a8bda5df98b91fea01a43e128a8e821058c (patch) | |
tree | 8899856b8ddee28d69fb009be3287a3fb331b48d | |
parent | 66d5fdf3b51188ddedac4baad6f5c1621db862f2 (diff) | |
download | puppet-cron_core-cf562a8bda5df98b91fea01a43e128a8e821058c.tar.gz puppet-cron_core-cf562a8bda5df98b91fea01a43e128a8e821058c.tar.bz2 |
(maint) Rubocop implicit begin fix
This commit addresses the Rubocop Style/RedundantBegin cop and
removes an explicit `begin` block in favor of implicit syntax.
-rw-r--r-- | spec/lib/puppet_spec/files.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb index 7a43100..53e0e17 100644 --- a/spec/lib/puppet_spec/files.rb +++ b/spec/lib/puppet_spec/files.rb @@ -9,12 +9,10 @@ module PuppetSpec::Files # rubocop:disable Style/GlobalVars $global_tempfiles ||= [] $global_tempfiles.each do |path| - begin - allow(Dir).to receive(:entries).and_call_original - FileUtils.rm_rf path, secure: true - rescue Errno::ENOENT - # nothing to do - end + allow(Dir).to receive(:entries).and_call_original + FileUtils.rm_rf path, secure: true + rescue Errno::ENOENT + # nothing to do end $global_tempfiles = [] # rubocop:enable Style/GlobalVars |