puppetlabs_spec_helper 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73e959eb1c762c128c0b2a845e50b60f3d6e9ff4553af789f976e4023203a1dc
4
- data.tar.gz: f7db17fb24bbdc582a30c60fc407a7c9f05c7c8d98430fc0f5a0f0151ffb9845
3
+ metadata.gz: be54cffdbba3df2bbc1d420a022b8c09944157f8d28eea1d4c287e117516595d
4
+ data.tar.gz: 4770d483808a9e6c380fb2ea6dc6bfb99730916ae1430fb4579a80a8421f51e7
5
5
  SHA512:
6
- metadata.gz: ccb6d06693bed2078af4b49ff5f41bb93a3a630eb322ff1b3f0fd12e683190272b61c64a0e2233adf96af08a397edc637745bdb074f7cb880163decfe2944f9a
7
- data.tar.gz: 0f29a0eb5882f6cb9fc7c11862aa4d2966067e342ea57f03abc4b62a8e28c119d9d52c4f72e4382d9412c3c3f29ca529747c81828f21cf48bd8e5d8f082faca7
6
+ metadata.gz: ea49b0a799ea3d8f8561f186705e4dcfe18b39b46abe60c082cd78ec5349e183ae4b19958d23be696edb0962c094f79b0cb5763d534e64c3d3a22633a617b76e
7
+ data.tar.gz: 34c2e4d8389a653e0c6b5e4ce07f78c84e8dd01d7acdb3d05a1ef0a5f20d3847c004c27d9594f8fc66c3121af69710598b6ef6e8fcded48c04db67d65b22e3c7
data/.rubocop.yml CHANGED
@@ -1,520 +1,19 @@
1
- ---
1
+ inherit_from: .rubocop_todo.yml
2
+
2
3
  require:
3
- - rubocop-performance
4
- - rubocop-rspec
4
+ - rubocop-performance
5
+ - rubocop-rspec
6
+
5
7
  AllCops:
6
- DisplayCopNames: true
8
+ Exclude:
9
+ - Gemfile
10
+ - Rakefile
11
+ - spec/fixtures/**/*
12
+ - vendor/bundle/**/*
13
+ NewCops: enable
7
14
  SuggestExtensions: false
8
15
  TargetRubyVersion: '2.7'
9
- Include:
10
- - "**/*.rb"
11
- Exclude:
12
- - bin/*
13
- - ".vendor/**/*"
14
- - "**/Gemfile"
15
- - "**/Rakefile"
16
- - pkg/**/*
17
- - spec/fixtures/**/*
18
- - vendor/**/*
19
- - "**/Puppetfile"
20
- - "**/Vagrantfile"
21
- - "**/Guardfile"
22
- - '**/*.erb'
23
- - 'lib/puppet-strings/yard/templates/**/*'
24
- Layout/LineLength:
25
- Description: People have wide screens, use them.
26
- Max: 200
27
- RSpec/BeforeAfterAll:
28
- Description: Beware of using after(:all) as it may cause state to leak between tests.
29
- A necessary evil in acceptance testing.
30
- Exclude:
31
- - spec/acceptance/**/*.rb
32
- RSpec/HookArgument:
33
- Description: Prefer explicit :each argument, matching existing module's style
34
- EnforcedStyle: each
35
- Style/BlockDelimiters:
36
- Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
37
- be consistent then.
38
- EnforcedStyle: braces_for_chaining
16
+
17
+ # Disabled
39
18
  Style/ClassAndModuleChildren:
40
- Description: Compact style reduces the required amount of indentation.
41
- EnforcedStyle: compact
42
- Style/EmptyElse:
43
- Description: Enforce against empty else clauses, but allow `nil` for clarity.
44
- EnforcedStyle: empty
45
- Style/FormatString:
46
- Description: Following the main puppet project's style, prefer the % format format.
47
- EnforcedStyle: percent
48
- Style/FormatStringToken:
49
- Description: Following the main puppet project's style, prefer the simpler template
50
- tokens over annotated ones.
51
- EnforcedStyle: template
52
- Style/Lambda:
53
- Description: Prefer the keyword for easier discoverability.
54
- EnforcedStyle: literal
55
- Style/RegexpLiteral:
56
- Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
57
- EnforcedStyle: percent_r
58
- Style/TernaryParentheses:
59
- Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
60
- on complex expressions for better readability, but seriously consider breaking
61
- it up.
62
- EnforcedStyle: require_parentheses_when_complex
63
- Style/TrailingCommaInArguments:
64
- Description: Prefer always trailing comma on multiline argument lists. This makes
65
- diffs, and re-ordering nicer.
66
- EnforcedStyleForMultiline: comma
67
- Style/TrailingCommaInArrayLiteral:
68
- Description: Prefer always trailing comma on multiline literals. This makes diffs,
69
- and re-ordering nicer.
70
- EnforcedStyleForMultiline: comma
71
- Style/SymbolArray:
72
- Description: Using percent style obscures symbolic intent of array's contents.
73
- EnforcedStyle: brackets
74
- RSpec/MessageSpies:
75
- EnforcedStyle: receive
76
- Style/Documentation:
77
- Exclude:
78
- - spec/**/*
79
- Style/WordArray:
80
- EnforcedStyle: brackets
81
- Performance/AncestorsInclude:
82
- Enabled: true
83
- Performance/BigDecimalWithNumericArgument:
84
- Enabled: true
85
- Performance/BlockGivenWithExplicitBlock:
86
- Enabled: true
87
- Performance/CaseWhenSplat:
88
- Enabled: true
89
- Performance/ConstantRegexp:
90
- Enabled: true
91
- Performance/MethodObjectAsBlock:
92
- Enabled: true
93
- Performance/RedundantSortBlock:
94
- Enabled: true
95
- Performance/RedundantStringChars:
96
- Enabled: true
97
- Performance/ReverseFirst:
98
- Enabled: true
99
- Performance/SortReverse:
100
- Enabled: true
101
- Performance/Squeeze:
102
- Enabled: true
103
- Performance/StringInclude:
104
- Enabled: true
105
- Performance/Sum:
106
- Enabled: true
107
- Style/CollectionMethods:
108
- Enabled: true
109
- Style/MethodCalledOnDoEndBlock:
110
- Enabled: true
111
- Style/StringMethods:
112
- Enabled: true
113
- Bundler/InsecureProtocolSource:
114
- Enabled: false
115
- Gemspec/DuplicatedAssignment:
116
- Enabled: false
117
- Gemspec/OrderedDependencies:
118
- Enabled: false
119
- Gemspec/RequiredRubyVersion:
120
- Enabled: false
121
- Gemspec/RubyVersionGlobalsUsage:
122
- Enabled: false
123
- Layout/ArgumentAlignment:
124
- Enabled: false
125
- Layout/BeginEndAlignment:
126
- Enabled: false
127
- Layout/ClosingHeredocIndentation:
128
- Enabled: true
129
- Layout/EmptyComment:
130
- Enabled: false
131
- Layout/EmptyLineAfterGuardClause:
132
- Enabled: false
133
- Layout/EmptyLinesAroundArguments:
134
- Enabled: false
135
- Layout/EmptyLinesAroundAttributeAccessor:
136
- Enabled: false
137
- Layout/EndOfLine:
138
- Enabled: false
139
- Layout/FirstArgumentIndentation:
140
- Enabled: false
141
- Layout/HashAlignment:
142
- Enabled: false
143
- Layout/HeredocIndentation:
144
- Enabled: true
145
- Layout/LeadingEmptyLines:
146
- Enabled: false
147
- Layout/SpaceAroundMethodCallOperator:
148
- Enabled: false
149
- Layout/SpaceInsideArrayLiteralBrackets:
150
- Enabled: false
151
- Layout/SpaceInsideReferenceBrackets:
152
- Enabled: false
153
- Lint/BigDecimalNew:
154
- Enabled: false
155
- Lint/BooleanSymbol:
156
- Enabled: false
157
- Lint/ConstantDefinitionInBlock:
158
- Enabled: false
159
- Lint/DeprecatedOpenSSLConstant:
160
- Enabled: false
161
- Lint/DisjunctiveAssignmentInConstructor:
162
- Enabled: false
163
- Lint/DuplicateElsifCondition:
164
- Enabled: false
165
- Lint/DuplicateRequire:
166
- Enabled: false
167
- Lint/DuplicateRescueException:
168
- Enabled: false
169
- Lint/EmptyConditionalBody:
170
- Enabled: false
171
- Lint/EmptyFile:
172
- Enabled: false
173
- Lint/ErbNewArguments:
174
- Enabled: false
175
- Lint/FloatComparison:
176
- Enabled: false
177
- Lint/HashCompareByIdentity:
178
- Enabled: false
179
- Lint/IdentityComparison:
180
- Enabled: false
181
- Lint/InterpolationCheck:
182
- Enabled: false
183
- Lint/MissingCopEnableDirective:
184
- Enabled: false
185
- Lint/MixedRegexpCaptureTypes:
186
- Enabled: false
187
- Lint/NestedPercentLiteral:
188
- Enabled: false
189
- Lint/NonDeterministicRequireOrder:
190
- Enabled: false
191
- Lint/OrderedMagicComments:
192
- Enabled: false
193
- Lint/OutOfRangeRegexpRef:
194
- Enabled: false
195
- Lint/RaiseException:
196
- Enabled: false
197
- Lint/RedundantCopEnableDirective:
198
- Enabled: false
199
- Lint/RedundantRequireStatement:
200
- Enabled: false
201
- Lint/RedundantSafeNavigation:
202
- Enabled: false
203
- Lint/RedundantWithIndex:
204
- Enabled: false
205
- Lint/RedundantWithObject:
206
- Enabled: false
207
- Lint/RegexpAsCondition:
208
- Enabled: false
209
- Lint/ReturnInVoidContext:
210
- Enabled: false
211
- Lint/SafeNavigationConsistency:
212
- Enabled: false
213
- Lint/SafeNavigationWithEmpty:
214
- Enabled: false
215
- Lint/SelfAssignment:
216
- Enabled: false
217
- Lint/SendWithMixinArgument:
218
- Enabled: false
219
- Lint/ShadowedArgument:
220
- Enabled: false
221
- Lint/StructNewOverride:
222
- Enabled: false
223
- Lint/ToJSON:
224
- Enabled: false
225
- Lint/TopLevelReturnWithArgument:
226
- Enabled: false
227
- Lint/TrailingCommaInAttributeDeclaration:
228
- Enabled: false
229
- Lint/UnreachableLoop:
230
- Enabled: false
231
- Lint/UriEscapeUnescape:
232
- Enabled: false
233
- Lint/UriRegexp:
234
- Enabled: false
235
- Lint/UselessMethodDefinition:
236
- Enabled: false
237
- Lint/UselessTimes:
238
- Enabled: false
239
- Metrics/AbcSize:
240
- Enabled: false
241
- Metrics/BlockLength:
242
- Enabled: false
243
- Metrics/BlockNesting:
244
- Enabled: false
245
- Metrics/ClassLength:
246
- Enabled: false
247
- Metrics/CyclomaticComplexity:
248
- Enabled: false
249
- Metrics/MethodLength:
250
- Enabled: false
251
- Metrics/ModuleLength:
252
- Enabled: false
253
- Metrics/ParameterLists:
254
- Enabled: false
255
- Metrics/PerceivedComplexity:
256
- Enabled: false
257
- Migration/DepartmentName:
258
- Enabled: false
259
- Naming/AccessorMethodName:
260
- Enabled: false
261
- Naming/BlockParameterName:
262
- Enabled: false
263
- Naming/HeredocDelimiterCase:
264
- Enabled: false
265
- Naming/HeredocDelimiterNaming:
266
- Enabled: false
267
- Naming/MemoizedInstanceVariableName:
268
- Enabled: false
269
- Naming/MethodParameterName:
270
- Enabled: false
271
- Naming/RescuedExceptionsVariableName:
272
- Enabled: false
273
- Naming/VariableNumber:
274
- Enabled: false
275
- Performance/BindCall:
276
- Enabled: false
277
- Performance/DeletePrefix:
278
- Enabled: false
279
- Performance/DeleteSuffix:
280
- Enabled: false
281
- Performance/InefficientHashSearch:
282
- Enabled: false
283
- Performance/UnfreezeString:
284
- Enabled: false
285
- Performance/UriDefaultParser:
286
- Enabled: false
287
- RSpec/Be:
288
- Enabled: false
289
- RSpec/Capybara/CurrentPathExpectation:
290
- Enabled: false
291
- RSpec/Capybara/FeatureMethods:
292
- Enabled: false
293
- RSpec/Capybara/VisibilityMatcher:
294
- Enabled: false
295
- RSpec/ContextMethod:
296
- Enabled: false
297
- RSpec/ContextWording:
298
- Enabled: false
299
- RSpec/DescribeClass:
300
- Enabled: false
301
- RSpec/EmptyHook:
302
- Enabled: false
303
- RSpec/EmptyLineAfterExample:
304
- Enabled: false
305
- RSpec/EmptyLineAfterExampleGroup:
306
- Enabled: false
307
- RSpec/EmptyLineAfterHook:
308
- Enabled: false
309
- RSpec/ExampleLength:
310
- Enabled: false
311
- RSpec/ExampleWithoutDescription:
312
- Enabled: false
313
- RSpec/ExpectChange:
314
- Enabled: false
315
- RSpec/ExpectInHook:
316
- Enabled: false
317
- RSpec/FactoryBot/AttributeDefinedStatically:
318
- Enabled: false
319
- RSpec/FactoryBot/CreateList:
320
- Enabled: false
321
- RSpec/FactoryBot/FactoryClassName:
322
- Enabled: false
323
- RSpec/FilePath:
324
- Enabled: false
325
- RSpec/HooksBeforeExamples:
326
- Enabled: false
327
- RSpec/ImplicitBlockExpectation:
328
- Enabled: false
329
- RSpec/ImplicitSubject:
330
- Enabled: false
331
- RSpec/LeakyConstantDeclaration:
332
- Enabled: false
333
- RSpec/LetBeforeExamples:
334
- Enabled: false
335
- RSpec/MissingExampleGroupArgument:
336
- Enabled: false
337
- RSpec/MultipleExpectations:
338
- Enabled: false
339
- RSpec/MultipleMemoizedHelpers:
340
- Enabled: false
341
- RSpec/MultipleSubjects:
342
- Enabled: false
343
- RSpec/NestedGroups:
344
- Enabled: false
345
- RSpec/PredicateMatcher:
346
- Enabled: false
347
- RSpec/ReceiveCounts:
348
- Enabled: false
349
- RSpec/ReceiveNever:
350
- Enabled: false
351
- RSpec/RepeatedExampleGroupBody:
352
- Enabled: false
353
- RSpec/RepeatedExampleGroupDescription:
354
- Enabled: false
355
- RSpec/RepeatedIncludeExample:
356
- Enabled: false
357
- RSpec/ReturnFromStub:
358
- Enabled: false
359
- RSpec/SharedExamples:
360
- Enabled: false
361
- RSpec/StubbedMock:
362
- Enabled: false
363
- RSpec/UnspecifiedException:
364
- Enabled: false
365
- RSpec/VariableDefinition:
366
- Enabled: false
367
- RSpec/VoidExpect:
368
- Enabled: false
369
- RSpec/Yield:
370
- Enabled: false
371
- Security/Open:
372
- Enabled: false
373
- Style/AccessModifierDeclarations:
374
- Enabled: false
375
- Style/AccessorGrouping:
376
- Enabled: false
377
- Style/AsciiComments:
378
- Enabled: false
379
- Style/BisectedAttrAccessor:
380
- Enabled: false
381
- Style/CaseLikeIf:
382
- Enabled: false
383
- Style/ClassEqualityComparison:
384
- Enabled: false
385
- Style/ColonMethodDefinition:
386
- Enabled: false
387
- Style/CombinableLoops:
388
- Enabled: false
389
- Style/CommentedKeyword:
390
- Enabled: false
391
- Style/Dir:
392
- Enabled: false
393
- Style/DoubleCopDisableDirective:
394
- Enabled: false
395
- Style/EmptyBlockParameter:
396
- Enabled: false
397
- Style/EmptyLambdaParameter:
398
- Enabled: false
399
- Style/Encoding:
400
- Enabled: false
401
- Style/EvalWithLocation:
402
- Enabled: false
403
- Style/ExpandPathArguments:
404
- Enabled: false
405
- Style/ExplicitBlockArgument:
406
- Enabled: false
407
- Style/ExponentialNotation:
408
- Enabled: false
409
- Style/FloatDivision:
410
- Enabled: false
411
- Style/FrozenStringLiteralComment:
412
- Enabled: false
413
- Style/GlobalStdStream:
414
- Enabled: false
415
- Style/HashAsLastArrayItem:
416
- Enabled: false
417
- Style/HashLikeCase:
418
- Enabled: false
419
- Style/HashTransformKeys:
420
- Enabled: false
421
- Style/HashTransformValues:
422
- Enabled: false
423
- Style/IfUnlessModifier:
424
- Enabled: false
425
- Style/KeywordParametersOrder:
426
- Enabled: false
427
- Style/MinMax:
428
- Enabled: false
429
- Style/MixinUsage:
430
- Enabled: false
431
- Style/MultilineWhenThen:
432
- Enabled: false
433
- Style/NegatedUnless:
434
- Enabled: false
435
- Style/NumericPredicate:
436
- Enabled: false
437
- Style/OptionalBooleanParameter:
438
- Enabled: false
439
- Style/OrAssignment:
440
- Enabled: false
441
- Style/RandomWithOffset:
442
- Enabled: false
443
- Style/RedundantAssignment:
444
- Enabled: false
445
- Style/RedundantCondition:
446
- Enabled: false
447
- Style/RedundantConditional:
448
- Enabled: false
449
- Style/RedundantFetchBlock:
450
- Enabled: false
451
- Style/RedundantFileExtensionInRequire:
452
- Enabled: false
453
- Style/RedundantRegexpCharacterClass:
454
- Enabled: false
455
- Style/RedundantRegexpEscape:
456
- Enabled: false
457
- Style/RedundantSelfAssignment:
458
- Enabled: false
459
- Style/RedundantSort:
460
- Enabled: false
461
- Style/RescueStandardError:
462
- Enabled: false
463
- Style/SingleArgumentDig:
464
- Enabled: false
465
- Style/SlicingWithRange:
466
- Enabled: false
467
- Style/SoleNestedConditional:
468
- Enabled: false
469
- Style/StderrPuts:
470
- Enabled: false
471
- Style/StringConcatenation:
472
- Enabled: false
473
- Style/Strip:
474
- Enabled: false
475
- Style/SymbolProc:
476
- Enabled: false
477
- Style/TrailingBodyOnClass:
478
- Enabled: false
479
- Style/TrailingBodyOnMethodDefinition:
480
- Enabled: false
481
- Style/TrailingBodyOnModule:
482
- Enabled: false
483
- Style/TrailingCommaInHashLiteral:
484
- Enabled: false
485
- Style/TrailingMethodEndStatement:
486
- Enabled: false
487
- Style/UnpackFirst:
488
- Enabled: false
489
- Lint/DuplicateBranch:
490
- Enabled: false
491
- Lint/DuplicateRegexpCharacterClassElement:
492
- Enabled: false
493
- Lint/EmptyBlock:
494
- Enabled: false
495
- Lint/EmptyClass:
496
- Enabled: false
497
- Lint/NoReturnInBeginEndBlocks:
498
- Enabled: false
499
- Lint/ToEnumArguments:
500
- Enabled: false
501
- Lint/UnexpectedBlockArity:
502
- Enabled: false
503
- Lint/UnmodifiedReduceAccumulator:
504
- Enabled: false
505
- Performance/CollectionLiteralInLoop:
506
- Enabled: false
507
- Style/ArgumentsForwarding:
508
- Enabled: false
509
- Style/CollectionCompact:
510
- Enabled: false
511
- Style/DocumentDynamicEvalDefinition:
512
- Enabled: false
513
- Style/NegatedIfElseCondition:
514
- Enabled: false
515
- Style/NilLambda:
516
- Enabled: false
517
- Style/RedundantArgument:
518
- Enabled: false
519
- Style/SwapValues:
520
19
  Enabled: false
data/README.md CHANGED
@@ -49,7 +49,7 @@ Fixture downloads will now execute in parallel to speed up the testing process.
49
49
  to a positive integer, the default is currently 10. We don't suggest going higher than 25 as the gains are marginal due to some repos taking a long time to download. Please be aware that your internal VCS system may not be able to handle a high load in which case the server would fail to clone the repository. Because of this issue, this setting is tunable via `MAX_FIXTURE_THREAD_COUNT`.
50
50
 
51
51
  Additionally, you can also speed up cloning when using the ssh protocol by multiplexing ssh sessions. Add something similar to your ssh config.
52
- Note: you may need to change the host if your using an internal git server.
52
+ Note: you may need to change the host if you're using an internal git server.
53
53
 
54
54
  ```shell
55
55
  Host github.com
@@ -257,7 +257,7 @@ fixtures:
257
257
  ref: "2.6.0"
258
258
  ```
259
259
 
260
- Only install the `yumrepo_core` module when testing against Puppet 6 or greater:
260
+ Only install the `yumrepo_core` module when testing against Puppet 7 or greater:
261
261
 
262
262
  ```yaml
263
263
  fixtures:
@@ -16,7 +16,7 @@ end
16
16
  spec_path = File.expand_path(File.join(Dir.pwd, 'spec'))
17
17
  fixture_path = File.join(spec_path, 'fixtures')
18
18
 
19
- env_module_path = ENV['MODULEPATH']
19
+ env_module_path = ENV.fetch('MODULEPATH', nil)
20
20
  module_path = File.join(fixture_path, 'modules')
21
21
 
22
22
  module_path = [module_path, env_module_path].join(File::PATH_SEPARATOR) if env_module_path
@@ -29,7 +29,7 @@ if ENV['SIMPLECOV'] == 'yes'
29
29
  SimpleCov.formatters = [
30
30
  SimpleCov::Formatter::HTMLFormatter,
31
31
  SimpleCov::Formatter::Console,
32
- SimpleCov::Formatter::Codecov,
32
+ SimpleCov::Formatter::Codecov
33
33
  ]
34
34
  SimpleCov.start do
35
35
  track_files 'lib/**/*.rb'
@@ -55,29 +55,30 @@ end
55
55
  # Add all spec lib dirs to LOAD_PATH
56
56
  components = module_path.split(File::PATH_SEPARATOR).map do |dir|
57
57
  next unless Dir.exist? dir
58
- Dir.entries(dir).reject { |f| f =~ %r{^\.} }.map { |f| File.join(dir, f, 'spec', 'lib') }
58
+
59
+ Dir.entries(dir).grep_v(/^\./).map { |f| File.join(dir, f, 'spec', 'lib') }
59
60
  end
60
61
  components.flatten.each do |d|
61
62
  $LOAD_PATH << d if FileTest.directory?(d) && !$LOAD_PATH.include?(d)
62
63
  end
63
64
 
64
65
  RSpec.configure do |c|
65
- if ENV['GITHUB_ACTIONS'] == 'true'
66
- c.formatter = 'RSpec::Github::Formatter'
67
- end
66
+ c.formatter = 'RSpec::Github::Formatter' if ENV['GITHUB_ACTIONS'] == 'true'
68
67
 
69
68
  c.environmentpath = spec_path
70
69
  c.module_path = module_path
71
70
  c.manifest_dir = File.join(fixture_path, 'manifests')
72
71
 
72
+ # https://github.com/puppetlabs/rspec-puppet#strict_variables
73
+ c.strict_variables = ENV['STRICT_VARIABLES'] != 'no'
74
+ # https://github.com/puppetlabs/rspec-puppet#ordering
75
+ c.ordering = ENV['ORDERING'] if ENV['ORDERING']
76
+
73
77
  c.before :each do
74
78
  if c.mock_framework.framework_name == :rspec
75
79
  allow(Puppet.features).to receive(:root?).and_return(true)
76
80
  else
77
81
  Puppet.features.stubs(:root?).returns(true)
78
82
  end
79
-
80
- Puppet.settings[:strict_variables] = true if ENV['STRICT_VARIABLES'] == 'yes' || ENV['STRICT_VARIABLES'] != 'no'
81
- Puppet.settings[:ordering] = ENV['ORDERING'] if ENV['ORDERING']
82
83
  end
83
84
  end
@@ -57,9 +57,7 @@ RSpec.configure do |config|
57
57
  # @mock_framework is used since more than seven years, and we need to avoid
58
58
  # `mock_framework`'s autoloading to distinguish between the default, and
59
59
  # the module's choice.
60
- if config.instance_variable_get(:@mock_framework).nil?
61
- config.mock_with :rspec
62
- end
60
+ config.mock_with :rspec if config.instance_variable_get(:@mock_framework).nil?
63
61
 
64
62
  # Here we do some general setup that is relevant to all initialization modes, regardless
65
63
  # of the availability of the TestHelper API.