makandra-rubocop 9.1.0 → 10.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 +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +28 -27
- data/config/default.yml +278 -88
- data/config/ext/rails.yml +250 -14
- data/config/ext/rspec.yml +277 -100
- data/lib/makandra_rubocop/version.rb +1 -1
- data/makandra-rubocop.gemspec +4 -4
- metadata +10 -10
data/config/ext/rspec.yml
CHANGED
@@ -7,11 +7,26 @@ inherit_mode:
|
|
7
7
|
|
8
8
|
RSpec:
|
9
9
|
Enabled: true
|
10
|
-
|
10
|
+
StyleGuideBaseURL: https://rspec.rubystyle.guide
|
11
|
+
DocumentationBaseURL: https://docs.rubocop.org/rubocop-rspec
|
12
|
+
Include: &1
|
11
13
|
- "**/*_spec.rb"
|
12
14
|
- "**/spec/**/*"
|
13
|
-
Language:
|
15
|
+
Language: &2
|
16
|
+
inherit_mode:
|
17
|
+
merge:
|
18
|
+
- Expectations
|
19
|
+
- Helpers
|
20
|
+
- Hooks
|
21
|
+
- HookScopes
|
22
|
+
- Runners
|
23
|
+
- Subjects
|
14
24
|
ExampleGroups:
|
25
|
+
inherit_mode:
|
26
|
+
merge:
|
27
|
+
- Regular
|
28
|
+
- Skipped
|
29
|
+
- Focused
|
15
30
|
Regular:
|
16
31
|
- describe
|
17
32
|
- context
|
@@ -26,6 +41,12 @@ RSpec:
|
|
26
41
|
- fcontext
|
27
42
|
- ffeature
|
28
43
|
Examples:
|
44
|
+
inherit_mode:
|
45
|
+
merge:
|
46
|
+
- Regular
|
47
|
+
- Skipped
|
48
|
+
- Focused
|
49
|
+
- Pending
|
29
50
|
Regular:
|
30
51
|
- it
|
31
52
|
- specify
|
@@ -68,6 +89,10 @@ RSpec:
|
|
68
89
|
- all
|
69
90
|
- suite
|
70
91
|
Includes:
|
92
|
+
inherit_mode:
|
93
|
+
merge:
|
94
|
+
- Examples
|
95
|
+
- Context
|
71
96
|
Examples:
|
72
97
|
- it_behaves_like
|
73
98
|
- it_should_behave_like
|
@@ -79,6 +104,10 @@ RSpec:
|
|
79
104
|
- to_not
|
80
105
|
- not_to
|
81
106
|
SharedGroups:
|
107
|
+
inherit_mode:
|
108
|
+
merge:
|
109
|
+
- Examples
|
110
|
+
- Context
|
82
111
|
Examples:
|
83
112
|
- shared_examples
|
84
113
|
- shared_examples_for
|
@@ -88,41 +117,68 @@ RSpec:
|
|
88
117
|
- subject
|
89
118
|
- subject!
|
90
119
|
|
120
|
+
Metrics/BlockLength:
|
121
|
+
inherit_mode:
|
122
|
+
merge:
|
123
|
+
- Exclude
|
124
|
+
Exclude:
|
125
|
+
- "**/*_spec.rb"
|
126
|
+
- "**/spec/**/*"
|
127
|
+
|
91
128
|
RSpec/AlignLeftLetBrace:
|
92
129
|
Description: Checks that left braces for adjacent single line lets are aligned.
|
93
130
|
Enabled: false
|
94
131
|
VersionAdded: '1.16'
|
95
|
-
|
132
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace
|
96
133
|
|
97
134
|
RSpec/AlignRightLetBrace:
|
98
135
|
Description: Checks that right braces for adjacent single line lets are aligned.
|
99
136
|
Enabled: false
|
100
137
|
VersionAdded: '1.16'
|
101
|
-
|
138
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace
|
102
139
|
|
103
140
|
RSpec/AnyInstance:
|
104
141
|
Description: Check that instances are not being stubbed globally.
|
105
142
|
Enabled: false # The example is good, but it does not work if you can not access the instance that needs to be stubbed
|
106
143
|
VersionAdded: '1.4'
|
107
|
-
StyleGuide: https://
|
144
|
+
StyleGuide: https://rspec.rubystyle.guide/#any_instance_of
|
145
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance
|
108
146
|
|
109
147
|
RSpec/AroundBlock:
|
110
148
|
Description: Checks that around blocks actually run the test.
|
111
149
|
Enabled: true
|
112
150
|
VersionAdded: '1.11'
|
113
|
-
|
151
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock
|
114
152
|
|
115
153
|
RSpec/Be:
|
116
154
|
Description: Check for expectations where `be` is used without argument.
|
117
155
|
Enabled: true
|
118
156
|
VersionAdded: '1.25'
|
119
|
-
StyleGuide: https://
|
157
|
+
StyleGuide: https://rspec.rubystyle.guide/#be-matcher
|
158
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
|
159
|
+
|
160
|
+
RSpec/BeEq:
|
161
|
+
Description: Check for expectations where `be(...)` can replace `eq(...)`.
|
162
|
+
Enabled: false # Leads to a large diff and the benefit is not that large
|
163
|
+
VersionAdded: 2.9.0
|
164
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEq
|
120
165
|
|
121
166
|
RSpec/BeEql:
|
122
167
|
Description: Check for expectations where `be(...)` can replace `eql(...)`.
|
123
168
|
Enabled: true
|
124
169
|
VersionAdded: '1.7'
|
125
|
-
|
170
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
|
171
|
+
|
172
|
+
RSpec/BeNil:
|
173
|
+
Description: Ensures a consistent style is used when matching `nil`.
|
174
|
+
Enabled: true
|
175
|
+
EnforcedStyle: be_nil
|
176
|
+
SupportedStyles:
|
177
|
+
- be
|
178
|
+
- be_nil
|
179
|
+
VersionAdded: 2.9.0
|
180
|
+
VersionChanged: 2.10.0
|
181
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeNil
|
126
182
|
|
127
183
|
RSpec/BeforeAfterAll:
|
128
184
|
Description: Check that before/after(:all) isn't being used.
|
@@ -132,13 +188,34 @@ RSpec/BeforeAfterAll:
|
|
132
188
|
- spec/rails_helper.rb
|
133
189
|
- spec/support/**/*.rb
|
134
190
|
VersionAdded: '1.12'
|
135
|
-
StyleGuide: https://
|
191
|
+
StyleGuide: https://rspec.rubystyle.guide/#avoid-hooks-with-context-scope
|
192
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
|
193
|
+
|
194
|
+
RSpec/ChangeByZero:
|
195
|
+
Description: Prefer negated matchers over `to change.by(0)`.
|
196
|
+
Enabled: true
|
197
|
+
VersionAdded: '2.11'
|
198
|
+
VersionChanged: '2.13'
|
199
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero
|
200
|
+
NegatedMatcher: ~
|
201
|
+
|
202
|
+
RSpec/ClassCheck:
|
203
|
+
Description: Enforces consistent use of `be_a` or `be_kind_of`.
|
204
|
+
StyleGuide: "#is-a-vs-kind-of"
|
205
|
+
Enabled: true
|
206
|
+
VersionAdded: '2.13'
|
207
|
+
EnforcedStyle: be_a
|
208
|
+
SupportedStyles:
|
209
|
+
- be_a
|
210
|
+
- be_kind_of
|
211
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ClassCheck
|
136
212
|
|
137
213
|
RSpec/ContextMethod:
|
138
214
|
Description: "`context` should not be used for specifying methods."
|
139
215
|
Enabled: true
|
140
216
|
VersionAdded: '1.36'
|
141
|
-
StyleGuide: https://
|
217
|
+
StyleGuide: https://rspec.rubystyle.guide/#example-group-naming
|
218
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod
|
142
219
|
|
143
220
|
RSpec/ContextWording:
|
144
221
|
Description: Checks that `context` docstring starts with an allowed prefix.
|
@@ -147,9 +224,11 @@ RSpec/ContextWording:
|
|
147
224
|
- when
|
148
225
|
- with
|
149
226
|
- without
|
227
|
+
AllowedPatterns: []
|
150
228
|
VersionAdded: '1.20'
|
151
|
-
VersionChanged:
|
152
|
-
StyleGuide: https://
|
229
|
+
VersionChanged: '2.13'
|
230
|
+
StyleGuide: https://rspec.rubystyle.guide/#context-descriptions
|
231
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
|
153
232
|
|
154
233
|
RSpec/DescribeClass:
|
155
234
|
Description: Check that the first argument to the top-level describe is a constant.
|
@@ -169,21 +248,22 @@ RSpec/DescribeClass:
|
|
169
248
|
- system
|
170
249
|
- mailbox
|
171
250
|
- aruba
|
251
|
+
- task
|
172
252
|
VersionAdded: '1.0'
|
173
|
-
VersionChanged: '
|
174
|
-
|
253
|
+
VersionChanged: '2.7'
|
254
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
|
175
255
|
|
176
256
|
RSpec/DescribeMethod:
|
177
257
|
Description: Checks that the second argument to `describe` specifies a method.
|
178
258
|
Enabled: true
|
179
259
|
VersionAdded: '1.0'
|
180
|
-
|
260
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod
|
181
261
|
|
182
262
|
RSpec/DescribeSymbol:
|
183
263
|
Description: Avoid describing symbols.
|
184
264
|
Enabled: true
|
185
265
|
VersionAdded: '1.15'
|
186
|
-
|
266
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol
|
187
267
|
|
188
268
|
RSpec/DescribedClass:
|
189
269
|
Description: Checks that tests use `described_class`.
|
@@ -196,64 +276,72 @@ RSpec/DescribedClass:
|
|
196
276
|
SafeAutoCorrect: false
|
197
277
|
VersionAdded: '1.0'
|
198
278
|
VersionChanged: '1.11'
|
199
|
-
|
279
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
|
200
280
|
|
201
281
|
RSpec/DescribedClassModuleWrapping:
|
202
282
|
Description: Avoid opening modules and defining specs within them.
|
203
283
|
Enabled: false
|
204
284
|
VersionAdded: '1.37'
|
205
|
-
|
285
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping
|
206
286
|
|
207
287
|
RSpec/Dialect:
|
208
|
-
Description:
|
288
|
+
Description: Enforces custom RSpec dialects.
|
209
289
|
Enabled: false
|
210
290
|
PreferredMethods: {}
|
211
291
|
VersionAdded: '1.33'
|
212
|
-
|
292
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
|
213
293
|
|
214
294
|
RSpec/EmptyExampleGroup:
|
215
295
|
Description: Checks if an example group does not include any tests.
|
216
296
|
Enabled: true
|
297
|
+
SafeAutoCorrect: false
|
217
298
|
VersionAdded: '1.7'
|
218
|
-
VersionChanged: '2.
|
219
|
-
|
299
|
+
VersionChanged: '2.13'
|
300
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
|
220
301
|
|
221
302
|
RSpec/EmptyHook:
|
222
303
|
Description: Checks for empty before and after hooks.
|
223
304
|
Enabled: true
|
224
305
|
VersionAdded: '1.39'
|
225
|
-
|
306
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
|
226
307
|
|
227
308
|
RSpec/EmptyLineAfterExample:
|
228
309
|
Description: Checks if there is an empty line after example blocks.
|
229
310
|
Enabled: true
|
230
311
|
AllowConsecutiveOneLiners: true
|
231
312
|
VersionAdded: '1.36'
|
232
|
-
StyleGuide: https://
|
313
|
+
StyleGuide: https://rspec.rubystyle.guide/#empty-lines-around-examples
|
314
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample
|
233
315
|
|
234
316
|
RSpec/EmptyLineAfterExampleGroup:
|
235
317
|
Description: Checks if there is an empty line after example group blocks.
|
236
318
|
Enabled: true
|
237
319
|
VersionAdded: '1.27'
|
238
|
-
StyleGuide: https://
|
320
|
+
StyleGuide: https://rspec.rubystyle.guide/#empty-lines-between-describes
|
321
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup
|
239
322
|
|
240
323
|
RSpec/EmptyLineAfterFinalLet:
|
241
324
|
Description: Checks if there is an empty line after the last let block.
|
242
325
|
Enabled: true
|
243
326
|
VersionAdded: '1.14'
|
244
|
-
StyleGuide: https://
|
327
|
+
StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
|
328
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
|
245
329
|
|
246
330
|
RSpec/EmptyLineAfterHook:
|
247
331
|
Description: Checks if there is an empty line after hook blocks.
|
248
332
|
Enabled: true
|
249
333
|
VersionAdded: '1.27'
|
250
|
-
|
334
|
+
VersionChanged: '2.13'
|
335
|
+
StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
|
336
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook
|
337
|
+
AllowConsecutiveOneLiners: true
|
251
338
|
|
252
339
|
RSpec/EmptyLineAfterSubject:
|
253
340
|
Description: Checks if there is an empty line after subject block.
|
254
341
|
Enabled: true
|
255
342
|
VersionAdded: '1.14'
|
256
|
-
StyleGuide: https://
|
343
|
+
StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
|
344
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
|
257
345
|
|
258
346
|
RSpec/ExampleLength:
|
259
347
|
Description: Checks for long examples.
|
@@ -262,7 +350,7 @@ RSpec/ExampleLength:
|
|
262
350
|
CountAsOne: []
|
263
351
|
VersionAdded: '1.5'
|
264
352
|
VersionChanged: '2.3'
|
265
|
-
|
353
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
|
266
354
|
|
267
355
|
RSpec/ExampleWithoutDescription:
|
268
356
|
Description: Checks for examples without a description.
|
@@ -273,7 +361,13 @@ RSpec/ExampleWithoutDescription:
|
|
273
361
|
- single_line_only
|
274
362
|
- disallow
|
275
363
|
VersionAdded: '1.22'
|
276
|
-
|
364
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
|
365
|
+
|
366
|
+
RSpec/ExcessiveDocstringSpacing:
|
367
|
+
Description: Checks for excessive whitespace in example descriptions.
|
368
|
+
Enabled: true
|
369
|
+
VersionAdded: '2.5'
|
370
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing
|
277
371
|
|
278
372
|
RSpec/ExampleWording:
|
279
373
|
Description: Checks for common mistakes in example descriptions.
|
@@ -286,7 +380,8 @@ RSpec/ExampleWording:
|
|
286
380
|
IgnoredWords: []
|
287
381
|
VersionAdded: '1.0'
|
288
382
|
VersionChanged: '1.2'
|
289
|
-
StyleGuide: https://
|
383
|
+
StyleGuide: https://rspec.rubystyle.guide/#should-in-example-docstrings
|
384
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
|
290
385
|
|
291
386
|
RSpec/ExpectActual:
|
292
387
|
Description: Checks for `expect(...)` calls containing literal values.
|
@@ -294,7 +389,7 @@ RSpec/ExpectActual:
|
|
294
389
|
Exclude:
|
295
390
|
- spec/routing/**/*
|
296
391
|
VersionAdded: '1.7'
|
297
|
-
|
392
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
|
298
393
|
|
299
394
|
RSpec/ExpectChange:
|
300
395
|
Description: Checks for consistent style of change matcher.
|
@@ -303,20 +398,22 @@ RSpec/ExpectChange:
|
|
303
398
|
SupportedStyles:
|
304
399
|
- method_call
|
305
400
|
- block
|
401
|
+
SafeAutoCorrect: false
|
306
402
|
VersionAdded: '1.22'
|
307
|
-
|
403
|
+
VersionChanged: '2.5'
|
404
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
|
308
405
|
|
309
406
|
RSpec/ExpectInHook:
|
310
407
|
Description: Do not use `expect` in hooks such as `before`.
|
311
408
|
Enabled: false # Maybe we want to change this in the future, currently we use this if a expectation is the same for multiple examples (e.g the response of a http response)
|
312
409
|
VersionAdded: '1.16'
|
313
|
-
|
410
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
|
314
411
|
|
315
412
|
RSpec/ExpectOutput:
|
316
413
|
Description: Checks for opportunities to use `expect { ... }.to output`.
|
317
414
|
Enabled: true
|
318
415
|
VersionAdded: '1.10'
|
319
|
-
|
416
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
|
320
417
|
|
321
418
|
RSpec/FilePath:
|
322
419
|
Description: Checks that spec file paths are consistent and well-formed.
|
@@ -331,14 +428,14 @@ RSpec/FilePath:
|
|
331
428
|
SpecSuffixOnly: false
|
332
429
|
VersionAdded: '1.2'
|
333
430
|
VersionChanged: '1.40'
|
334
|
-
|
431
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
|
335
432
|
|
336
433
|
RSpec/Focus:
|
337
434
|
Description: Checks if examples are focused.
|
338
435
|
Enabled: true
|
339
436
|
VersionAdded: '1.5'
|
340
437
|
VersionChanged: '2.1'
|
341
|
-
|
438
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
|
342
439
|
|
343
440
|
RSpec/HookArgument:
|
344
441
|
Description: Checks the arguments passed to `before`, `around`, and `after`.
|
@@ -349,25 +446,27 @@ RSpec/HookArgument:
|
|
349
446
|
- each
|
350
447
|
- example
|
351
448
|
VersionAdded: '1.7'
|
352
|
-
StyleGuide: https://
|
449
|
+
StyleGuide: https://rspec.rubystyle.guide/#redundant-beforeeach
|
450
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
|
353
451
|
|
354
452
|
RSpec/HooksBeforeExamples:
|
355
453
|
Description: Checks for before/around/after hooks that come after an example.
|
356
454
|
Enabled: true
|
357
455
|
VersionAdded: '1.29'
|
358
|
-
|
456
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
|
359
457
|
|
360
458
|
RSpec/IdenticalEqualityAssertion:
|
361
459
|
Description: Checks for equality assertions with identical expressions on both sides.
|
362
460
|
Enabled: true
|
363
461
|
VersionAdded: '2.4'
|
364
|
-
|
462
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion
|
365
463
|
|
366
464
|
RSpec/ImplicitBlockExpectation:
|
367
465
|
Description: Check that implicit block expectation syntax is not used.
|
368
466
|
Enabled: true
|
369
467
|
VersionAdded: '1.35'
|
370
|
-
StyleGuide: https://
|
468
|
+
StyleGuide: https://rspec.rubystyle.guide/#implicit-block-expectations
|
469
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation
|
371
470
|
|
372
471
|
RSpec/ImplicitExpect:
|
373
472
|
Description: Check that a consistent implicit expectation style is used.
|
@@ -377,7 +476,8 @@ RSpec/ImplicitExpect:
|
|
377
476
|
- is_expected
|
378
477
|
- should
|
379
478
|
VersionAdded: '1.8'
|
380
|
-
StyleGuide: https://
|
479
|
+
StyleGuide: https://rspec.rubystyle.guide/#use-expect
|
480
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
|
381
481
|
|
382
482
|
RSpec/ImplicitSubject:
|
383
483
|
Description: Checks for usage of implicit subject (`is_expected` / `should`).
|
@@ -389,13 +489,13 @@ RSpec/ImplicitSubject:
|
|
389
489
|
- disallow
|
390
490
|
VersionAdded: '1.29'
|
391
491
|
VersionChanged: '1.30'
|
392
|
-
|
492
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
|
393
493
|
|
394
494
|
RSpec/InstanceSpy:
|
395
495
|
Description: Checks for `instance_double` used with `have_received`.
|
396
496
|
Enabled: true
|
397
497
|
VersionAdded: '1.12'
|
398
|
-
|
498
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy
|
399
499
|
|
400
500
|
RSpec/InstanceVariable:
|
401
501
|
Description: Checks for instance variable usage in specs.
|
@@ -403,7 +503,8 @@ RSpec/InstanceVariable:
|
|
403
503
|
AssignmentOnly: false
|
404
504
|
VersionAdded: '1.0'
|
405
505
|
VersionChanged: '1.7'
|
406
|
-
StyleGuide: https://
|
506
|
+
StyleGuide: https://rspec.rubystyle.guide/#instance-variables
|
507
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
|
407
508
|
|
408
509
|
RSpec/ItBehavesLike:
|
409
510
|
Description: Checks that only one `it_behaves_like` style is used.
|
@@ -413,45 +514,47 @@ RSpec/ItBehavesLike:
|
|
413
514
|
- it_behaves_like
|
414
515
|
- it_should_behave_like
|
415
516
|
VersionAdded: '1.13'
|
416
|
-
|
517
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
|
417
518
|
|
418
519
|
RSpec/IteratedExpectation:
|
419
520
|
Description: Check that `all` matcher is used instead of iterating over an array.
|
420
521
|
Enabled: true
|
421
522
|
VersionAdded: '1.14'
|
422
|
-
|
523
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
|
423
524
|
|
424
525
|
RSpec/LeadingSubject:
|
425
526
|
Description: Enforce that subject is the first definition in the test.
|
426
527
|
Enabled: false # We don't do this
|
427
528
|
VersionAdded: '1.7'
|
428
529
|
VersionChanged: '1.14'
|
429
|
-
StyleGuide: https://
|
530
|
+
StyleGuide: https://rspec.rubystyle.guide/#leading-subject
|
531
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject
|
430
532
|
|
431
533
|
RSpec/LeakyConstantDeclaration:
|
432
534
|
Description: Checks that no class, module, or constant is declared.
|
433
535
|
Enabled: true
|
434
536
|
VersionAdded: '1.35'
|
435
|
-
StyleGuide: https://
|
537
|
+
StyleGuide: https://rspec.rubystyle.guide/#declare-constants
|
538
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
|
436
539
|
|
437
540
|
RSpec/LetBeforeExamples:
|
438
541
|
Description: Checks for `let` definitions that come after an example.
|
439
542
|
Enabled: true
|
440
543
|
VersionAdded: '1.16'
|
441
544
|
VersionChanged: '1.22'
|
442
|
-
|
545
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
|
443
546
|
|
444
547
|
RSpec/LetSetup:
|
445
548
|
Description: Checks unreferenced `let!` calls being used for test setup.
|
446
549
|
Enabled: false # It seems better to remove this cop from the default set, the reasons are weird https://github.com/rubocop-hq/rubocop-rspec/issues/94
|
447
550
|
VersionAdded: '1.7'
|
448
|
-
|
551
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
|
449
552
|
|
450
553
|
RSpec/MessageChain:
|
451
554
|
Description: Check that chains of messages are not being stubbed.
|
452
555
|
Enabled: true
|
453
556
|
VersionAdded: '1.7'
|
454
|
-
|
557
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain
|
455
558
|
|
456
559
|
RSpec/MessageExpectation:
|
457
560
|
Description: Checks for consistent message expectation style.
|
@@ -462,7 +565,7 @@ RSpec/MessageExpectation:
|
|
462
565
|
- expect
|
463
566
|
VersionAdded: '1.7'
|
464
567
|
VersionChanged: '1.8'
|
465
|
-
|
568
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
|
466
569
|
|
467
570
|
RSpec/MessageSpies:
|
468
571
|
Description: Checks that message expectations are set using spies.
|
@@ -472,19 +575,19 @@ RSpec/MessageSpies:
|
|
472
575
|
- have_received
|
473
576
|
- receive
|
474
577
|
VersionAdded: '1.9'
|
475
|
-
|
578
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
|
476
579
|
|
477
580
|
RSpec/MissingExampleGroupArgument:
|
478
581
|
Description: Checks that the first argument to an example group is not empty.
|
479
582
|
Enabled: true
|
480
583
|
VersionAdded: '1.28'
|
481
|
-
|
584
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
|
482
585
|
|
483
586
|
RSpec/MultipleDescribes:
|
484
587
|
Description: Checks for multiple top-level example groups.
|
485
588
|
Enabled: true
|
486
589
|
VersionAdded: '1.0'
|
487
|
-
|
590
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes
|
488
591
|
|
489
592
|
RSpec/MultipleExpectations:
|
490
593
|
Description: Checks if examples contain too many `expect` calls.
|
@@ -492,7 +595,8 @@ RSpec/MultipleExpectations:
|
|
492
595
|
Max: 1
|
493
596
|
VersionAdded: '1.7'
|
494
597
|
VersionChanged: '1.21'
|
495
|
-
StyleGuide: https://
|
598
|
+
StyleGuide: https://rspec.rubystyle.guide/#expectation-per-example
|
599
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations
|
496
600
|
|
497
601
|
RSpec/MultipleMemoizedHelpers:
|
498
602
|
Description: Checks if example groups contain too many `let` and `subject` calls.
|
@@ -500,28 +604,38 @@ RSpec/MultipleMemoizedHelpers:
|
|
500
604
|
AllowSubject: true
|
501
605
|
Max: 5
|
502
606
|
VersionAdded: '1.43'
|
503
|
-
StyleGuide: https://
|
607
|
+
StyleGuide: https://rspec.rubystyle.guide/#let-blocks
|
608
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleMemoizedHelpers
|
504
609
|
|
505
610
|
RSpec/MultipleSubjects:
|
506
611
|
Description: Checks if an example group defines `subject` multiple times.
|
507
612
|
Enabled: true
|
508
613
|
VersionAdded: '1.16'
|
509
|
-
|
614
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects
|
510
615
|
|
511
616
|
RSpec/NamedSubject:
|
512
617
|
Description: Checks for explicitly referenced test subjects.
|
513
618
|
Enabled: false # https://github.com/makandra/makandra-rubocop/issues/23 - good default but not enforced
|
514
619
|
IgnoreSharedExamples: true
|
515
620
|
VersionAdded: 1.5.3
|
516
|
-
StyleGuide: https://
|
621
|
+
StyleGuide: https://rspec.rubystyle.guide/#use-subject
|
622
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
|
517
623
|
|
518
624
|
RSpec/NestedGroups:
|
519
625
|
Description: Checks for nested example groups.
|
520
626
|
Enabled: false # We do not want to have such limitation
|
521
627
|
Max: 3
|
628
|
+
AllowedGroups: []
|
522
629
|
VersionAdded: '1.7'
|
523
|
-
VersionChanged: '
|
524
|
-
|
630
|
+
VersionChanged: '2.13'
|
631
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups
|
632
|
+
|
633
|
+
RSpec/NoExpectationExample:
|
634
|
+
Description: Checks if an example contains any expectation.
|
635
|
+
Enabled: false # requires some config for custom expectations
|
636
|
+
Safe: false
|
637
|
+
VersionAdded: '2.13'
|
638
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample
|
525
639
|
|
526
640
|
RSpec/NotToNot:
|
527
641
|
Description: Checks for consistent method usage for negating expectations.
|
@@ -531,19 +645,19 @@ RSpec/NotToNot:
|
|
531
645
|
- not_to
|
532
646
|
- to_not
|
533
647
|
VersionAdded: '1.4'
|
534
|
-
|
648
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
|
535
649
|
|
536
650
|
RSpec/OverwritingSetup:
|
537
651
|
Description: Checks if there is a let/subject that overwrites an existing one.
|
538
652
|
Enabled: true # This would break tests, but it's worth the effort
|
539
653
|
VersionAdded: '1.14'
|
540
|
-
|
654
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup
|
541
655
|
|
542
656
|
RSpec/Pending:
|
543
657
|
Description: Checks for any pending or skipped examples.
|
544
658
|
Enabled: false
|
545
659
|
VersionAdded: '1.25'
|
546
|
-
|
660
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
|
547
661
|
|
548
662
|
RSpec/PredicateMatcher:
|
549
663
|
Description: Prefer using predicate matcher over using predicate method directly.
|
@@ -556,49 +670,50 @@ RSpec/PredicateMatcher:
|
|
556
670
|
- explicit
|
557
671
|
SafeAutoCorrect: false
|
558
672
|
VersionAdded: '1.16'
|
559
|
-
StyleGuide: https://
|
673
|
+
StyleGuide: https://rspec.rubystyle.guide/#predicate-matchers
|
674
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
|
560
675
|
|
561
676
|
RSpec/ReceiveCounts:
|
562
677
|
Description: Check for `once` and `twice` receive counts matchers usage.
|
563
678
|
Enabled: true
|
564
679
|
VersionAdded: '1.26'
|
565
|
-
|
680
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
|
566
681
|
|
567
682
|
RSpec/ReceiveNever:
|
568
683
|
Description: Prefer `not_to receive(...)` over `receive(...).never`.
|
569
684
|
Enabled: true
|
570
685
|
VersionAdded: '1.28'
|
571
|
-
|
686
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
|
572
687
|
|
573
688
|
RSpec/RepeatedDescription:
|
574
689
|
Description: Check for repeated description strings in example groups.
|
575
690
|
Enabled: true
|
576
691
|
VersionAdded: '1.9'
|
577
|
-
|
692
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
|
578
693
|
|
579
694
|
RSpec/RepeatedExample:
|
580
695
|
Description: Check for repeated examples within example groups.
|
581
696
|
Enabled: true
|
582
697
|
VersionAdded: '1.10'
|
583
|
-
|
698
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
|
584
699
|
|
585
700
|
RSpec/RepeatedExampleGroupBody:
|
586
701
|
Description: Check for repeated describe and context block body.
|
587
702
|
Enabled: true
|
588
703
|
VersionAdded: '1.38'
|
589
|
-
|
704
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody
|
590
705
|
|
591
706
|
RSpec/RepeatedExampleGroupDescription:
|
592
707
|
Description: Check for repeated example group descriptions.
|
593
708
|
Enabled: true
|
594
709
|
VersionAdded: '1.38'
|
595
|
-
|
710
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription
|
596
711
|
|
597
712
|
RSpec/RepeatedIncludeExample:
|
598
713
|
Description: Check for repeated include of shared examples.
|
599
714
|
Enabled: true
|
600
715
|
VersionAdded: '1.44'
|
601
|
-
|
716
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedIncludeExample
|
602
717
|
|
603
718
|
RSpec/ReturnFromStub:
|
604
719
|
Description: Checks for consistent style of stub's return setting.
|
@@ -609,57 +724,65 @@ RSpec/ReturnFromStub:
|
|
609
724
|
- block
|
610
725
|
VersionAdded: '1.16'
|
611
726
|
VersionChanged: '1.22'
|
612
|
-
|
727
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
|
613
728
|
|
614
729
|
RSpec/ScatteredLet:
|
615
730
|
Description: Checks for let scattered across the example group.
|
616
731
|
Enabled: true
|
617
732
|
VersionAdded: '1.14'
|
618
733
|
VersionChanged: '1.39'
|
619
|
-
|
734
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
|
620
735
|
|
621
736
|
RSpec/ScatteredSetup:
|
622
737
|
Description: Checks for setup scattered across multiple hooks in an example group.
|
623
738
|
Enabled: true
|
624
739
|
VersionAdded: '1.10'
|
625
|
-
|
740
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
|
626
741
|
|
627
742
|
RSpec/SharedContext:
|
628
743
|
Description: Checks for proper shared_context and shared_examples usage.
|
629
744
|
Enabled: true
|
630
745
|
VersionAdded: '1.13'
|
631
|
-
|
746
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
|
632
747
|
|
633
748
|
RSpec/SharedExamples:
|
634
749
|
Description: Enforces use of string to titleize shared examples.
|
635
750
|
Enabled: true
|
636
751
|
VersionAdded: '1.25'
|
637
|
-
|
752
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
|
638
753
|
|
639
754
|
RSpec/SingleArgumentMessageChain:
|
640
755
|
Description: Checks that chains of messages contain more than one element.
|
641
756
|
Enabled: true
|
642
757
|
VersionAdded: '1.9'
|
643
758
|
VersionChanged: '1.10'
|
644
|
-
|
759
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
|
645
760
|
|
646
761
|
RSpec/StubbedMock:
|
647
762
|
Description: Checks that message expectations do not have a configured response.
|
648
763
|
Enabled: false # Maybe add later, currently there are too many conflicts
|
649
764
|
VersionAdded: '1.44'
|
650
|
-
|
765
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock
|
766
|
+
|
767
|
+
RSpec/SubjectDeclaration:
|
768
|
+
Description: Ensure that subject is defined using subject helper.
|
769
|
+
Enabled: true
|
770
|
+
VersionAdded: '2.5'
|
771
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectDeclaration
|
651
772
|
|
652
773
|
RSpec/SubjectStub:
|
653
774
|
Description: Checks for stubbed test subjects.
|
654
775
|
Enabled: false #https://github.com/makandra/makandra-rubocop/issues/24
|
655
776
|
VersionAdded: '1.7'
|
656
|
-
|
777
|
+
VersionChanged: '2.8'
|
778
|
+
StyleGuide: https://rspec.rubystyle.guide/#dont-stub-subject
|
779
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
|
657
780
|
|
658
781
|
RSpec/UnspecifiedException:
|
659
782
|
Description: Checks for a specified error in checking raised errors.
|
660
783
|
Enabled: true
|
661
784
|
VersionAdded: '1.30'
|
662
|
-
|
785
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException
|
663
786
|
|
664
787
|
RSpec/VariableDefinition:
|
665
788
|
Description: Checks that memoized helpers names are symbols or strings.
|
@@ -669,7 +792,7 @@ RSpec/VariableDefinition:
|
|
669
792
|
- symbols
|
670
793
|
- strings
|
671
794
|
VersionAdded: '1.40'
|
672
|
-
|
795
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
|
673
796
|
|
674
797
|
RSpec/VariableName:
|
675
798
|
Description: Checks that memoized helper names use the configured style.
|
@@ -678,10 +801,22 @@ RSpec/VariableName:
|
|
678
801
|
SupportedStyles:
|
679
802
|
- snake_case
|
680
803
|
- camelCase
|
681
|
-
|
804
|
+
AllowedPatterns: []
|
682
805
|
VersionAdded: '1.40'
|
683
|
-
VersionChanged: '
|
684
|
-
|
806
|
+
VersionChanged: '2.13'
|
807
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName
|
808
|
+
|
809
|
+
RSpec/VerifiedDoubleReference:
|
810
|
+
Description: Checks for consistent verified double reference style.
|
811
|
+
Enabled: true
|
812
|
+
SafeAutoCorrect: false
|
813
|
+
EnforcedStyle: constant
|
814
|
+
SupportedStyles:
|
815
|
+
- constant
|
816
|
+
- string
|
817
|
+
VersionAdded: 2.10.0
|
818
|
+
VersionChanged: '2.12'
|
819
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubleReference
|
685
820
|
|
686
821
|
RSpec/VerifiedDoubles:
|
687
822
|
Description: Prefer using verifying doubles over normal doubles.
|
@@ -690,26 +825,32 @@ RSpec/VerifiedDoubles:
|
|
690
825
|
IgnoreSymbolicNames: false
|
691
826
|
VersionAdded: 1.2.1
|
692
827
|
VersionChanged: '1.5'
|
693
|
-
StyleGuide: https://
|
828
|
+
StyleGuide: https://rspec.rubystyle.guide/#doubles
|
829
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
|
694
830
|
|
695
831
|
RSpec/VoidExpect:
|
696
|
-
Description:
|
832
|
+
Description: Checks void `expect()`.
|
697
833
|
Enabled: true
|
698
834
|
VersionAdded: '1.16'
|
699
|
-
|
835
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect
|
700
836
|
|
701
837
|
RSpec/Yield:
|
702
|
-
Description:
|
838
|
+
Description: Checks for calling a block within a stub.
|
703
839
|
Enabled: true
|
704
840
|
VersionAdded: '1.32'
|
705
|
-
|
841
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
|
842
|
+
|
843
|
+
RSpec/Capybara:
|
844
|
+
Enabled: true
|
845
|
+
Include: *1
|
846
|
+
Language: *2
|
706
847
|
|
707
848
|
RSpec/Capybara/CurrentPathExpectation:
|
708
849
|
Description: Checks that no expectations are set on Capybara's `current_path`.
|
709
850
|
Enabled: true
|
710
851
|
VersionAdded: '1.18'
|
711
852
|
VersionChanged: '2.0'
|
712
|
-
|
853
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
|
713
854
|
|
714
855
|
RSpec/Capybara/FeatureMethods:
|
715
856
|
Description: Checks for consistent method usage in feature specs.
|
@@ -717,14 +858,31 @@ RSpec/Capybara/FeatureMethods:
|
|
717
858
|
EnabledMethods: []
|
718
859
|
VersionAdded: '1.17'
|
719
860
|
VersionChanged: '2.0'
|
720
|
-
|
861
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
|
862
|
+
|
863
|
+
RSpec/Capybara/SpecificFinders:
|
864
|
+
Description: Checks if there is a more specific finder offered by Capybara.
|
865
|
+
Enabled: true
|
866
|
+
VersionAdded: '2.13'
|
867
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificFinders
|
868
|
+
|
869
|
+
RSpec/Capybara/SpecificMatcher:
|
870
|
+
Description: Checks for there is a more specific matcher offered by Capybara.
|
871
|
+
Enabled: true
|
872
|
+
VersionAdded: '2.12'
|
873
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificMatcher
|
721
874
|
|
722
875
|
RSpec/Capybara/VisibilityMatcher:
|
723
|
-
Description: Checks for boolean visibility in
|
876
|
+
Description: Checks for boolean visibility in Capybara finders.
|
724
877
|
Enabled: true
|
725
878
|
VersionAdded: '1.39'
|
726
879
|
VersionChanged: '2.0'
|
727
|
-
|
880
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
|
881
|
+
|
882
|
+
RSpec/FactoryBot:
|
883
|
+
Enabled: true
|
884
|
+
Include: *1
|
885
|
+
Language: *2
|
728
886
|
|
729
887
|
RSpec/FactoryBot/AttributeDefinedStatically:
|
730
888
|
Description: Always declare attribute values as blocks.
|
@@ -735,7 +893,7 @@ RSpec/FactoryBot/AttributeDefinedStatically:
|
|
735
893
|
- features/support/factories/**/*.rb
|
736
894
|
VersionAdded: '1.28'
|
737
895
|
VersionChanged: '2.0'
|
738
|
-
|
896
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
|
739
897
|
|
740
898
|
RSpec/FactoryBot/CreateList:
|
741
899
|
Description: Checks for create_list usage.
|
@@ -752,7 +910,7 @@ RSpec/FactoryBot/CreateList:
|
|
752
910
|
- n_times
|
753
911
|
VersionAdded: '1.25'
|
754
912
|
VersionChanged: '2.0'
|
755
|
-
|
913
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
|
756
914
|
|
757
915
|
RSpec/FactoryBot/FactoryClassName:
|
758
916
|
Description: Use string value when setting the class attribute explicitly.
|
@@ -763,13 +921,32 @@ RSpec/FactoryBot/FactoryClassName:
|
|
763
921
|
- features/support/factories/**/*.rb
|
764
922
|
VersionAdded: '1.37'
|
765
923
|
VersionChanged: '2.0'
|
766
|
-
|
924
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
|
925
|
+
|
926
|
+
RSpec/FactoryBot/SyntaxMethods:
|
927
|
+
Description: Use shorthands from `FactoryBot::Syntax::Methods` in your specs.
|
928
|
+
Enabled: false # requires the usage of `FactoryBot::Syntax::Methods`
|
929
|
+
SafeAutoCorrect: false
|
930
|
+
VersionAdded: '2.7'
|
931
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/SyntaxMethods
|
932
|
+
|
933
|
+
RSpec/Rails:
|
934
|
+
Enabled: true
|
935
|
+
Include: *1
|
936
|
+
Language: *2
|
767
937
|
|
768
938
|
RSpec/Rails/AvoidSetupHook:
|
769
939
|
Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
|
770
940
|
Enabled: true
|
771
941
|
VersionAdded: '2.4'
|
772
|
-
|
942
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook
|
943
|
+
|
944
|
+
RSpec/Rails/HaveHttpStatus:
|
945
|
+
Description: Checks that tests use `have_http_status` instead of equality matchers.
|
946
|
+
Enabled: true
|
947
|
+
SafeAutoCorrect: false
|
948
|
+
VersionAdded: '2.12'
|
949
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HaveHttpStatus
|
773
950
|
|
774
951
|
RSpec/Rails/HttpStatus:
|
775
952
|
Description: Enforces use of symbolic or numeric value to describe HTTP status.
|
@@ -780,4 +957,4 @@ RSpec/Rails/HttpStatus:
|
|
780
957
|
- symbolic
|
781
958
|
VersionAdded: '1.23'
|
782
959
|
VersionChanged: '2.0'
|
783
|
-
|
960
|
+
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
|