Skip to content

Commit e5e51a2

Browse files
authored
Merge pull request #435 from puppetlabs/gh-397-honour_default_symlink
(bug) - check for empty fixtures array, as well as nil
2 parents 62b6f63 + db10c85 commit e5e51a2

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.rubocop_todo.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2024-02-01 17:06:08 UTC using RuboCop version 1.50.2.
3+
# on 2024-02-09 08:47:26 UTC using RuboCop version 1.50.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -17,7 +17,7 @@ Gemspec/RequireMFA:
1717
# Offense count: 5
1818
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
1919
Metrics/AbcSize:
20-
Max: 58
20+
Max: 60
2121

2222
# Offense count: 3
2323
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
@@ -28,7 +28,7 @@ Metrics/BlockLength:
2828
# Offense count: 4
2929
# Configuration parameters: AllowedMethods, AllowedPatterns.
3030
Metrics/CyclomaticComplexity:
31-
Max: 18
31+
Max: 19
3232

3333
# Offense count: 11
3434
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
@@ -49,7 +49,7 @@ Metrics/ParameterLists:
4949
# Offense count: 3
5050
# Configuration parameters: AllowedMethods, AllowedPatterns.
5151
Metrics/PerceivedComplexity:
52-
Max: 21
52+
Max: 22
5353

5454
# Offense count: 1
5555
# Configuration parameters: IgnoredMetadata.

lib/puppetlabs_spec_helper/tasks/fixtures.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ def fixtures(category)
106106
end
107107

108108
fixtures = fixtures['fixtures']
109-
110-
fixtures['symlinks'] = fixtures['symlinks'].nil? ? auto_symlink : auto_symlink.merge!(fixtures['symlinks'])
109+
fixtures['symlinks'] = fixtures['symlinks'].nil? || fixtures['symlinks'].empty? ? auto_symlink : auto_symlink.merge!(fixtures['symlinks'])
111110

112111
result = {}
113112
if fixtures.include?(category) && !fixtures[category].nil?

0 commit comments

Comments
 (0)