Skip to content

Commit cf562a8

Browse files
committed
(maint) Rubocop implicit begin fix
This commit addresses the Rubocop Style/RedundantBegin cop and removes an explicit `begin` block in favor of implicit syntax.
1 parent 66d5fdf commit cf562a8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spec/lib/puppet_spec/files.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ def self.cleanup
99
# rubocop:disable Style/GlobalVars
1010
$global_tempfiles ||= []
1111
$global_tempfiles.each do |path|
12-
begin
13-
allow(Dir).to receive(:entries).and_call_original
14-
FileUtils.rm_rf path, secure: true
15-
rescue Errno::ENOENT
16-
# nothing to do
17-
end
12+
allow(Dir).to receive(:entries).and_call_original
13+
FileUtils.rm_rf path, secure: true
14+
rescue Errno::ENOENT
15+
# nothing to do
1816
end
1917
$global_tempfiles = []
2018
# rubocop:enable Style/GlobalVars

0 commit comments

Comments
 (0)