rubocop-rspec 1.44.1 → 2.2.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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -1
  3. data/README.md +5 -1
  4. data/config/default.yml +171 -81
  5. data/lib/rubocop-rspec.rb +8 -8
  6. data/lib/rubocop/cop/rspec/align_left_let_brace.rb +7 -3
  7. data/lib/rubocop/cop/rspec/align_right_let_brace.rb +7 -3
  8. data/lib/rubocop/cop/rspec/any_instance.rb +6 -10
  9. data/lib/rubocop/cop/rspec/around_block.rb +1 -1
  10. data/lib/rubocop/cop/rspec/base.rb +6 -55
  11. data/lib/rubocop/cop/rspec/be.rb +2 -2
  12. data/lib/rubocop/cop/rspec/be_eql.rb +1 -0
  13. data/lib/rubocop/cop/rspec/before_after_all.rb +5 -3
  14. data/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +4 -2
  15. data/lib/rubocop/cop/rspec/capybara/feature_methods.rb +3 -2
  16. data/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +2 -0
  17. data/lib/rubocop/cop/rspec/describe_class.rb +2 -2
  18. data/lib/rubocop/cop/rspec/describe_method.rb +2 -2
  19. data/lib/rubocop/cop/rspec/describe_symbol.rb +1 -0
  20. data/lib/rubocop/cop/rspec/described_class.rb +1 -2
  21. data/lib/rubocop/cop/rspec/described_class_module_wrapping.rb +1 -2
  22. data/lib/rubocop/cop/rspec/dialect.rb +1 -1
  23. data/lib/rubocop/cop/rspec/empty_example_group.rb +6 -45
  24. data/lib/rubocop/cop/rspec/empty_hook.rb +1 -1
  25. data/lib/rubocop/cop/rspec/empty_line_after_example.rb +1 -1
  26. data/lib/rubocop/cop/rspec/empty_line_after_example_group.rb +1 -1
  27. data/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +1 -1
  28. data/lib/rubocop/cop/rspec/empty_line_after_hook.rb +1 -1
  29. data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +2 -2
  30. data/lib/rubocop/cop/rspec/expect_actual.rb +2 -1
  31. data/lib/rubocop/cop/rspec/expect_change.rb +1 -0
  32. data/lib/rubocop/cop/rspec/expect_in_hook.rb +1 -1
  33. data/lib/rubocop/cop/rspec/expect_output.rb +1 -1
  34. data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +1 -0
  35. data/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb +1 -0
  36. data/lib/rubocop/cop/rspec/file_path.rb +24 -17
  37. data/lib/rubocop/cop/rspec/focus.rb +43 -8
  38. data/lib/rubocop/cop/rspec/hook_argument.rb +2 -4
  39. data/lib/rubocop/cop/rspec/hooks_before_examples.rb +2 -2
  40. data/lib/rubocop/cop/rspec/implicit_block_expectation.rb +1 -0
  41. data/lib/rubocop/cop/rspec/implicit_expect.rb +1 -1
  42. data/lib/rubocop/cop/rspec/implicit_subject.rb +1 -0
  43. data/lib/rubocop/cop/rspec/instance_spy.rb +1 -1
  44. data/lib/rubocop/cop/rspec/instance_variable.rb +1 -1
  45. data/lib/rubocop/cop/rspec/it_behaves_like.rb +2 -1
  46. data/lib/rubocop/cop/rspec/iterated_expectation.rb +1 -1
  47. data/lib/rubocop/cop/rspec/let_before_examples.rb +2 -2
  48. data/lib/rubocop/cop/rspec/let_setup.rb +7 -4
  49. data/lib/rubocop/cop/rspec/message_chain.rb +4 -10
  50. data/lib/rubocop/cop/rspec/message_expectation.rb +1 -0
  51. data/lib/rubocop/cop/rspec/message_spies.rb +3 -3
  52. data/lib/rubocop/cop/rspec/mixin/comments_help.rb +38 -0
  53. data/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb +51 -0
  54. data/lib/rubocop/cop/rspec/mixin/final_end_location.rb +19 -0
  55. data/lib/rubocop/cop/rspec/mixin/top_level_group.rb +54 -0
  56. data/lib/rubocop/cop/rspec/mixin/variable.rb +20 -0
  57. data/lib/rubocop/cop/rspec/multiple_describes.rb +2 -3
  58. data/lib/rubocop/cop/rspec/multiple_expectations.rb +1 -1
  59. data/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +3 -1
  60. data/lib/rubocop/cop/rspec/named_subject.rb +8 -12
  61. data/lib/rubocop/cop/rspec/nested_groups.rb +1 -1
  62. data/lib/rubocop/cop/rspec/not_to_not.rb +1 -0
  63. data/lib/rubocop/cop/rspec/overwriting_setup.rb +2 -1
  64. data/lib/rubocop/cop/rspec/pending.rb +13 -5
  65. data/lib/rubocop/cop/rspec/predicate_matcher.rb +3 -3
  66. data/lib/rubocop/cop/rspec/rails/http_status.rb +1 -0
  67. data/lib/rubocop/cop/rspec/receive_counts.rb +2 -0
  68. data/lib/rubocop/cop/rspec/receive_never.rb +1 -0
  69. data/lib/rubocop/cop/rspec/repeated_include_example.rb +3 -2
  70. data/lib/rubocop/cop/rspec/return_from_stub.rb +1 -0
  71. data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
  72. data/lib/rubocop/cop/rspec/shared_context.rb +18 -11
  73. data/lib/rubocop/cop/rspec/shared_examples.rb +3 -1
  74. data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +2 -1
  75. data/lib/rubocop/cop/rspec/stubbed_mock.rb +1 -1
  76. data/lib/rubocop/cop/rspec/subject_stub.rb +16 -6
  77. data/lib/rubocop/cop/rspec/unspecified_exception.rb +1 -0
  78. data/lib/rubocop/cop/rspec/variable_definition.rb +1 -1
  79. data/lib/rubocop/cop/rspec/variable_name.rb +1 -1
  80. data/lib/rubocop/cop/rspec/verified_doubles.rb +1 -0
  81. data/lib/rubocop/cop/rspec/void_expect.rb +1 -0
  82. data/lib/rubocop/cop/rspec_cops.rb +0 -1
  83. data/lib/rubocop/rspec/align_let_brace.rb +1 -1
  84. data/lib/rubocop/rspec/concept.rb +2 -2
  85. data/lib/rubocop/rspec/config_formatter.rb +5 -3
  86. data/lib/rubocop/rspec/corrector/move_node.rb +7 -10
  87. data/lib/rubocop/rspec/example_group.rb +15 -5
  88. data/lib/rubocop/rspec/hook.rb +1 -1
  89. data/lib/rubocop/rspec/inject.rb +4 -2
  90. data/lib/rubocop/rspec/language.rb +143 -109
  91. data/lib/rubocop/rspec/language/node_pattern.rb +7 -24
  92. data/lib/rubocop/rspec/node.rb +1 -1
  93. data/lib/rubocop/rspec/version.rb +1 -1
  94. metadata +12 -15
  95. data/lib/rubocop/cop/rspec/cop.rb +0 -10
  96. data/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb +0 -41
  97. data/lib/rubocop/rspec.rb +0 -12
  98. data/lib/rubocop/rspec/empty_line_separation.rb +0 -48
  99. data/lib/rubocop/rspec/final_end_location.rb +0 -17
  100. data/lib/rubocop/rspec/top_level_describe.rb +0 -52
  101. data/lib/rubocop/rspec/top_level_group.rb +0 -57
  102. data/lib/rubocop/rspec/variable.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd834ceb18475775328b46ac9c17d5b0d44b718c0a78a72ec82bd14730624de8
4
- data.tar.gz: f68ba33f60563a6f8ab4264ee2bc42ee4fd5a34e838c2961ef0286e88f1986bd
3
+ metadata.gz: c1531e973244c7aac66856335d340dee502696e988f9816bf74e7f5555d80d90
4
+ data.tar.gz: b634d15c53e126f497928eca6adfa6fae08b095ccb1a93f3d906826bca56efd4
5
5
  SHA512:
6
- metadata.gz: ee6383660785ebd59d6fe885f107550c59e1881f838f1c51c21bbdd3b6bbd78ef0c0f8fc0935c06df0237da5927a223de0e3adf9a1abdb1262bffa9877e5e213
7
- data.tar.gz: 02c425dc74c4b898a718330ead4679dfcdc4405a6c5fde2bfe78c4c4796a1e96617c185612abfe1c812039ccd8bccce1da2fe3ef37b53c835f9eff6d22d4d62b
6
+ metadata.gz: e91e8656f9f82f02fa041d5795d01eba023460aad4e3c06b55167b3f92fc0d22324250e1d116eb63c3b60e915240347f0a36cbe14c8b3752f7c6a63ea9949bd4
7
+ data.tar.gz: 8c470782145e23962f3653beb13b4543d461a3de9bbea201d5fb0c66fc8bfebb5695afad7bc545b37dba664362dee8edb0f579441f0bafcd963ab86f503b0415
data/CHANGELOG.md CHANGED
@@ -1,7 +1,36 @@
1
- # Change log
1
+ # Changelog
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 2.2.0 (2021-02-02)
6
+
7
+ * Fix `HooksBeforeExamples`, `LeadingSubject`, `LetBeforeExamples` and `ScatteredLet` autocorrection to take into account inline comments and comments immediately before the moved node. ([@Darhazer][])
8
+ * Improve rubocop-rspec performance. ([@Darhazer][], [@bquorning][])
9
+ * Include `Enabled: true` to prevent a mismatched configuration parameter warning when `RSpec` cops are explicitly enabled in the user configuration. ([@pirj][])
10
+
11
+ ## 2.1.0 (2020-12-17)
12
+
13
+ * Fix `RSpec/FilePath` false positive for relative file path runs with long namespaces. ([@ahukkanen][])
14
+ * Update `RSpec/Focus` to have auto-correction. ([@dvandersluis][])
15
+
16
+ ## 2.0.1 (2020-12-02)
17
+
18
+ * Fixed infinite loop in `RSpec/ExpectActual` autocorrection when both expected and actual values are literals. ([@Darhazer][])
19
+
20
+ ## 2.0.0 (2020-11-06)
21
+
22
+ * Remove deprecated class `::RuboCop::Cop::RSpec::Cop`. ([@bquorning][])
23
+ * Retire `RSpec/InvalidPredicateMatcher` cop. ([@pirj][])
24
+ * Remove the code responsible for filtering files to inspect. ([@pirj][])
25
+ * Make RSpec language elements configurable. ([@sl4vr][])
26
+ * Remove `CustomIncludeMethods` `RSpec/EmptyExampleGroup` option in favour of the new RSpec DSL configuration. ([@pirj][])
27
+ * Enabled pending cop (`RSpec/StubbedMock`). ([@pirj][])
28
+
29
+ ## 2.0.0.pre (2020-10-22)
30
+
31
+ * Update RuboCop dependency to v1.0.0. ([@bquorning][])
32
+ * Change namespace of several cops (`Capybara/*` -> `RSpec/Capybara/*`, `FactoryBot/*` -> `RSpec/FactoryBot/*`, `Rails/*` -> `RSpec/Rails/*`). ([@pirj][], [@bquorning][])
33
+
5
34
  ## 1.44.1 (2020-10-20)
6
35
 
7
36
  * Relax `rubocop-ast` version constraint. ([@PhilCoggins][])
@@ -571,3 +600,6 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
571
600
  [@koic]: https://github.com/koic
572
601
  [@Rafix02]: https://github.com/Rafix02
573
602
  [@PhilCoggins]: https://github.com/PhilCoggins
603
+ [@sl4vr]: https://github.com/sl4vr
604
+ [@ahukkanen]: https://github.com/ahukkanen
605
+ [@dvandersluis]: https://github.com/dvandersluis
data/README.md CHANGED
@@ -23,6 +23,10 @@ or if you use bundler put this in your `Gemfile`
23
23
  gem 'rubocop-rspec', require: false
24
24
  ```
25
25
 
26
+ ### Upgrading to RuboCop RSpec v2.x
27
+
28
+ Read all the details in our [Upgrade to Version 2.x](https://docs.rubocop.org/rubocop-rspec/2.0/upgrade_to_version_2.html) document.
29
+
26
30
  ## Usage
27
31
 
28
32
  You need to tell RuboCop to load the RSpec extension. There are three
@@ -67,7 +71,7 @@ rubocop-rspec is available on Code Climate as part of the rubocop engine. [Learn
67
71
 
68
72
  ## Documentation
69
73
 
70
- You can read more about RuboCop-RSpec in its [official manual](https://docs.rubocop.org/rubocop-rspec).
74
+ You can read more about RuboCop RSpec in its [official manual](https://docs.rubocop.org/rubocop-rspec).
71
75
 
72
76
  ## The Cops
73
77
 
data/config/default.yml CHANGED
@@ -1,14 +1,86 @@
1
1
  ---
2
- AllCops:
3
- RSpec:
4
- Patterns:
5
- - _spec.rb
6
- - "(?:^|/)spec/"
7
- RSpec/FactoryBot:
8
- Patterns:
9
- - spec/factories.rb
10
- - spec/factories/**/*.rb
11
- - features/support/factories/**/*.rb
2
+ RSpec:
3
+ Enabled: true
4
+ Include:
5
+ - "**/*_spec.rb"
6
+ - "**/spec/**/*"
7
+ Language:
8
+ ExampleGroups:
9
+ Regular:
10
+ - describe
11
+ - context
12
+ - feature
13
+ - example_group
14
+ Skipped:
15
+ - xdescribe
16
+ - xcontext
17
+ - xfeature
18
+ Focused:
19
+ - fdescribe
20
+ - fcontext
21
+ - ffeature
22
+ Examples:
23
+ Regular:
24
+ - it
25
+ - specify
26
+ - example
27
+ - scenario
28
+ - its
29
+ Focused:
30
+ - fit
31
+ - fspecify
32
+ - fexample
33
+ - fscenario
34
+ - focus
35
+ Skipped:
36
+ - xit
37
+ - xspecify
38
+ - xexample
39
+ - xscenario
40
+ - skip
41
+ Pending:
42
+ - pending
43
+ Expectations:
44
+ - expect
45
+ - is_expected
46
+ - expect_any_instance_of
47
+ Helpers:
48
+ - let
49
+ - let!
50
+ Hooks:
51
+ - prepend_before
52
+ - before
53
+ - append_before
54
+ - around
55
+ - prepend_after
56
+ - after
57
+ - append_after
58
+ HookScopes:
59
+ - each
60
+ - example
61
+ - context
62
+ - all
63
+ - suite
64
+ Includes:
65
+ Examples:
66
+ - it_behaves_like
67
+ - it_should_behave_like
68
+ - include_examples
69
+ Context:
70
+ - include_context
71
+ Runners:
72
+ - to
73
+ - to_not
74
+ - not_to
75
+ SharedGroups:
76
+ Examples:
77
+ - shared_examples
78
+ - shared_examples_for
79
+ Context:
80
+ - shared_context
81
+ Subjects:
82
+ - subject
83
+ - subject!
12
84
 
13
85
  RSpec/AlignLeftLetBrace:
14
86
  Description: Checks that left braces for adjacent single line lets are aligned.
@@ -50,9 +122,9 @@ RSpec/BeforeAfterAll:
50
122
  Description: Check that before/after(:all) isn't being used.
51
123
  Enabled: true
52
124
  Exclude:
53
- - spec/spec_helper.rb
54
- - spec/rails_helper.rb
55
- - spec/support/**/*.rb
125
+ - spec/spec_helper.rb
126
+ - spec/rails_helper.rb
127
+ - spec/support/**/*.rb
56
128
  VersionAdded: '1.12'
57
129
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
58
130
 
@@ -66,9 +138,9 @@ RSpec/ContextWording:
66
138
  Description: Checks that `context` docstring starts with an allowed prefix.
67
139
  Enabled: true
68
140
  Prefixes:
69
- - when
70
- - with
71
- - without
141
+ - when
142
+ - with
143
+ - without
72
144
  VersionAdded: '1.20'
73
145
  VersionChanged: 1.20.1
74
146
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
@@ -78,19 +150,19 @@ RSpec/DescribeClass:
78
150
  Enabled: true
79
151
  IgnoredMetadata:
80
152
  type:
81
- - channel
82
- - controller
83
- - helper
84
- - job
85
- - mailer
86
- - model
87
- - request
88
- - routing
89
- - view
90
- - feature
91
- - system
92
- - mailbox
93
- - aruba
153
+ - channel
154
+ - controller
155
+ - helper
156
+ - job
157
+ - mailer
158
+ - model
159
+ - request
160
+ - routing
161
+ - view
162
+ - feature
163
+ - system
164
+ - mailbox
165
+ - aruba
94
166
  VersionAdded: '1.0'
95
167
  VersionChanged: '1.44'
96
168
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
@@ -113,8 +185,8 @@ RSpec/DescribedClass:
113
185
  SkipBlocks: false
114
186
  EnforcedStyle: described_class
115
187
  SupportedStyles:
116
- - described_class
117
- - explicit
188
+ - described_class
189
+ - explicit
118
190
  SafeAutoCorrect: false
119
191
  VersionAdded: '1.0'
120
192
  VersionChanged: '1.11'
@@ -136,8 +208,8 @@ RSpec/Dialect:
136
208
  RSpec/EmptyExampleGroup:
137
209
  Description: Checks if an example group does not include any tests.
138
210
  Enabled: true
139
- CustomIncludeMethods: []
140
211
  VersionAdded: '1.7'
212
+ VersionChanged: '2.0'
141
213
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
142
214
 
143
215
  RSpec/EmptyHook:
@@ -189,9 +261,9 @@ RSpec/ExampleWithoutDescription:
189
261
  Enabled: true
190
262
  EnforcedStyle: always_allow
191
263
  SupportedStyles:
192
- - always_allow
193
- - single_line_only
194
- - disallow
264
+ - always_allow
265
+ - single_line_only
266
+ - disallow
195
267
  VersionAdded: '1.22'
196
268
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
197
269
 
@@ -212,7 +284,7 @@ RSpec/ExpectActual:
212
284
  Description: Checks for `expect(...)` calls containing literal values.
213
285
  Enabled: true
214
286
  Exclude:
215
- - spec/routing/**/*
287
+ - spec/routing/**/*
216
288
  VersionAdded: '1.7'
217
289
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
218
290
 
@@ -221,8 +293,8 @@ RSpec/ExpectChange:
221
293
  Enabled: true
222
294
  EnforcedStyle: method_call
223
295
  SupportedStyles:
224
- - method_call
225
- - block
296
+ - method_call
297
+ - block
226
298
  VersionAdded: '1.22'
227
299
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
228
300
 
@@ -241,6 +313,9 @@ RSpec/ExpectOutput:
241
313
  RSpec/FilePath:
242
314
  Description: Checks that spec file paths are consistent and well-formed.
243
315
  Enabled: true
316
+ Include:
317
+ - "**/*_spec*rb*"
318
+ - "**/spec/**/*"
244
319
  CustomTransform:
245
320
  RuboCop: rubocop
246
321
  RSpec: rspec
@@ -254,6 +329,7 @@ RSpec/Focus:
254
329
  Description: Checks if examples are focused.
255
330
  Enabled: true
256
331
  VersionAdded: '1.5'
332
+ VersionChanged: '2.1'
257
333
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
258
334
 
259
335
  RSpec/HookArgument:
@@ -261,9 +337,9 @@ RSpec/HookArgument:
261
337
  Enabled: true
262
338
  EnforcedStyle: implicit
263
339
  SupportedStyles:
264
- - implicit
265
- - each
266
- - example
340
+ - implicit
341
+ - each
342
+ - example
267
343
  VersionAdded: '1.7'
268
344
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
269
345
 
@@ -284,8 +360,8 @@ RSpec/ImplicitExpect:
284
360
  Enabled: true
285
361
  EnforcedStyle: is_expected
286
362
  SupportedStyles:
287
- - is_expected
288
- - should
363
+ - is_expected
364
+ - should
289
365
  VersionAdded: '1.8'
290
366
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
291
367
 
@@ -294,9 +370,9 @@ RSpec/ImplicitSubject:
294
370
  Enabled: true
295
371
  EnforcedStyle: single_line_only
296
372
  SupportedStyles:
297
- - single_line_only
298
- - single_statement_only
299
- - disallow
373
+ - single_line_only
374
+ - single_statement_only
375
+ - disallow
300
376
  VersionAdded: '1.29'
301
377
  VersionChanged: '1.30'
302
378
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
@@ -315,19 +391,13 @@ RSpec/InstanceVariable:
315
391
  VersionChanged: '1.7'
316
392
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
317
393
 
318
- RSpec/InvalidPredicateMatcher:
319
- Description: Checks invalid usage for predicate matcher.
320
- Enabled: true
321
- VersionAdded: '1.16'
322
- StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher
323
-
324
394
  RSpec/ItBehavesLike:
325
395
  Description: Checks that only one `it_behaves_like` style is used.
326
396
  Enabled: true
327
397
  EnforcedStyle: it_behaves_like
328
398
  SupportedStyles:
329
- - it_behaves_like
330
- - it_should_behave_like
399
+ - it_behaves_like
400
+ - it_should_behave_like
331
401
  VersionAdded: '1.13'
332
402
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
333
403
 
@@ -374,8 +444,8 @@ RSpec/MessageExpectation:
374
444
  Enabled: false
375
445
  EnforcedStyle: allow
376
446
  SupportedStyles:
377
- - allow
378
- - expect
447
+ - allow
448
+ - expect
379
449
  VersionAdded: '1.7'
380
450
  VersionChanged: '1.8'
381
451
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
@@ -385,8 +455,8 @@ RSpec/MessageSpies:
385
455
  Enabled: true
386
456
  EnforcedStyle: have_received
387
457
  SupportedStyles:
388
- - have_received
389
- - receive
458
+ - have_received
459
+ - receive
390
460
  VersionAdded: '1.9'
391
461
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
392
462
 
@@ -444,8 +514,8 @@ RSpec/NotToNot:
444
514
  Enabled: true
445
515
  EnforcedStyle: not_to
446
516
  SupportedStyles:
447
- - not_to
448
- - to_not
517
+ - not_to
518
+ - to_not
449
519
  VersionAdded: '1.4'
450
520
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
451
521
 
@@ -468,8 +538,8 @@ RSpec/PredicateMatcher:
468
538
  EnforcedStyle: inflected
469
539
  AllowedExplicitMatchers: []
470
540
  SupportedStyles:
471
- - inflected
472
- - explicit
541
+ - inflected
542
+ - explicit
473
543
  SafeAutoCorrect: false
474
544
  VersionAdded: '1.16'
475
545
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
@@ -521,8 +591,8 @@ RSpec/ReturnFromStub:
521
591
  Enabled: true
522
592
  EnforcedStyle: and_return
523
593
  SupportedStyles:
524
- - and_return
525
- - block
594
+ - and_return
595
+ - block
526
596
  VersionAdded: '1.16'
527
597
  VersionChanged: '1.22'
528
598
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
@@ -561,7 +631,7 @@ RSpec/SingleArgumentMessageChain:
561
631
 
562
632
  RSpec/StubbedMock:
563
633
  Description: Checks that message expectations do not have a configured response.
564
- Enabled: pending
634
+ Enabled: true
565
635
  VersionAdded: '1.44'
566
636
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock
567
637
 
@@ -582,8 +652,8 @@ RSpec/VariableDefinition:
582
652
  Enabled: true
583
653
  EnforcedStyle: symbols
584
654
  SupportedStyles:
585
- - symbols
586
- - strings
655
+ - symbols
656
+ - strings
587
657
  VersionAdded: '1.40'
588
658
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
589
659
 
@@ -592,8 +662,8 @@ RSpec/VariableName:
592
662
  Enabled: true
593
663
  EnforcedStyle: snake_case
594
664
  SupportedStyles:
595
- - snake_case
596
- - camelCase
665
+ - snake_case
666
+ - camelCase
597
667
  IgnoredPatterns: []
598
668
  VersionAdded: '1.40'
599
669
  VersionChanged: '1.43'
@@ -620,54 +690,74 @@ RSpec/Yield:
620
690
  VersionAdded: '1.32'
621
691
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
622
692
 
623
- Capybara/CurrentPathExpectation:
693
+ RSpec/Capybara/CurrentPathExpectation:
624
694
  Description: Checks that no expectations are set on Capybara's `current_path`.
625
695
  Enabled: true
626
696
  VersionAdded: '1.18'
697
+ VersionChanged: '2.0'
627
698
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
628
699
 
629
- Capybara/FeatureMethods:
700
+ RSpec/Capybara/FeatureMethods:
630
701
  Description: Checks for consistent method usage in feature specs.
631
702
  Enabled: true
632
703
  EnabledMethods: []
633
704
  VersionAdded: '1.17'
634
- VersionChanged: '1.25'
705
+ VersionChanged: '2.0'
635
706
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
636
707
 
637
- Capybara/VisibilityMatcher:
708
+ RSpec/Capybara/VisibilityMatcher:
638
709
  Description: Checks for boolean visibility in capybara finders.
639
710
  Enabled: true
640
711
  VersionAdded: '1.39'
712
+ VersionChanged: '2.0'
641
713
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
642
714
 
643
- FactoryBot/AttributeDefinedStatically:
715
+ RSpec/FactoryBot/AttributeDefinedStatically:
644
716
  Description: Always declare attribute values as blocks.
645
717
  Enabled: true
718
+ Include:
719
+ - spec/factories.rb
720
+ - spec/factories/**/*.rb
721
+ - features/support/factories/**/*.rb
646
722
  VersionAdded: '1.28'
723
+ VersionChanged: '2.0'
647
724
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
648
725
 
649
- FactoryBot/CreateList:
726
+ RSpec/FactoryBot/CreateList:
650
727
  Description: Checks for create_list usage.
651
728
  Enabled: true
729
+ Include:
730
+ - "**/*_spec.rb"
731
+ - "**/spec/**/*"
732
+ - spec/factories.rb
733
+ - spec/factories/**/*.rb
734
+ - features/support/factories/**/*.rb
652
735
  EnforcedStyle: create_list
653
736
  SupportedStyles:
654
- - create_list
655
- - n_times
737
+ - create_list
738
+ - n_times
656
739
  VersionAdded: '1.25'
740
+ VersionChanged: '2.0'
657
741
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
658
742
 
659
- FactoryBot/FactoryClassName:
743
+ RSpec/FactoryBot/FactoryClassName:
660
744
  Description: Use string value when setting the class attribute explicitly.
661
745
  Enabled: true
746
+ Include:
747
+ - spec/factories.rb
748
+ - spec/factories/**/*.rb
749
+ - features/support/factories/**/*.rb
662
750
  VersionAdded: '1.37'
751
+ VersionChanged: '2.0'
663
752
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
664
753
 
665
- Rails/HttpStatus:
754
+ RSpec/Rails/HttpStatus:
666
755
  Description: Enforces use of symbolic or numeric value to describe HTTP status.
667
756
  Enabled: true
668
757
  EnforcedStyle: symbolic
669
758
  SupportedStyles:
670
- - numeric
671
- - symbolic
759
+ - numeric
760
+ - symbolic
672
761
  VersionAdded: '1.23'
762
+ VersionChanged: '2.0'
673
763
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus