File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 6
6
# Note that changes in the inspected code, or installation of new
7
7
# versions of RuboCop, may require this file to be generated again.
8
8
9
- # Offense count: 1
10
- # Configuration parameters: AllowComments, AllowEmptyLambdas.
11
- Lint/EmptyBlock :
12
- Exclude :
13
- - ' tests/units/test_archive.rb'
14
-
15
9
# Offense count: 3
16
10
# Configuration parameters: AllowedParentClasses.
17
11
Lint/MissingSuper :
Original file line number Diff line number Diff line change @@ -8,8 +8,16 @@ def setup
8
8
@git = Git . open ( @wdir )
9
9
end
10
10
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
+ #
11
18
def tempfile
12
- Dir ::Tmpname . create ( 'test-archive' ) { }
19
+ random_string = SecureRandom . hex ( 8 )
20
+ File . join ( Dir . tmpdir , "test-archive-#{ random_string } " )
13
21
end
14
22
15
23
def test_archive
You can’t perform that action at this time.
0 commit comments