Skip to content

Commit 9081f0f

Browse files
committed
fix: fix Rubocop Lint/EmptyBlock offense
1 parent bd691c5 commit 9081f0f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 1
10-
# Configuration parameters: AllowComments, AllowEmptyLambdas.
11-
Lint/EmptyBlock:
12-
Exclude:
13-
- 'tests/units/test_archive.rb'
14-
159
# Offense count: 3
1610
# Configuration parameters: AllowedParentClasses.
1711
Lint/MissingSuper:

tests/units/test_archive.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ def setup
88
@git = Git.open(@wdir)
99
end
1010

11+
require 'securerandom'
12+
require 'tmpdir'
13+
14+
# Create a temporary file path without actually creating the file
15+
#
16+
# @return [String] the path to the temporary file
17+
#
1118
def tempfile
12-
Dir::Tmpname.create('test-archive') {}
19+
random_string = SecureRandom.hex(8)
20+
File.join(Dir.tmpdir, "test-archive-#{random_string}")
1321
end
1422

1523
def test_archive

0 commit comments

Comments
 (0)