rubocop-rspec 2.30.0 → 3.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/config/default.yml +57 -265
  5. data/config/obsoletion.yml +11 -0
  6. data/lib/rubocop/cop/rspec/base.rb +0 -1
  7. data/lib/rubocop/cop/rspec/dialect.rb +13 -0
  8. data/lib/rubocop/cop/rspec/expect_actual.rb +1 -1
  9. data/lib/rubocop/cop/rspec/expect_in_hook.rb +1 -1
  10. data/lib/rubocop/cop/rspec/expect_in_let.rb +1 -3
  11. data/lib/rubocop/cop/rspec/leaky_constant_declaration.rb +1 -1
  12. data/lib/rubocop/cop/rspec/missing_expectation_target_method.rb +54 -0
  13. data/lib/rubocop/cop/rspec/multiple_describes.rb +1 -1
  14. data/lib/rubocop/cop/rspec/multiple_expectations.rb +2 -2
  15. data/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +2 -4
  16. data/lib/rubocop/cop/rspec/named_subject.rb +5 -2
  17. data/lib/rubocop/cop/rspec/predicate_matcher.rb +1 -1
  18. data/lib/rubocop/cop/rspec/remove_const.rb +0 -1
  19. data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
  20. data/lib/rubocop/cop/rspec/sort_metadata.rb +1 -1
  21. data/lib/rubocop/cop/rspec/stubbed_mock.rb +3 -1
  22. data/lib/rubocop/cop/rspec/subject_stub.rb +2 -2
  23. data/lib/rubocop/cop/rspec_cops.rb +1 -25
  24. data/lib/rubocop/rspec/concept.rb +0 -1
  25. data/lib/rubocop/rspec/config_formatter.rb +1 -24
  26. data/lib/rubocop/rspec/cop/generator.rb +25 -0
  27. data/lib/rubocop/rspec/language.rb +0 -1
  28. data/lib/rubocop/rspec/shared_contexts/default_rspec_language_config_context.rb +1 -1
  29. data/lib/rubocop/rspec/version.rb +1 -1
  30. data/lib/rubocop-rspec.rb +1 -17
  31. metadata +4 -67
  32. data/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +0 -39
  33. data/lib/rubocop/cop/rspec/capybara/feature_methods.rb +0 -104
  34. data/lib/rubocop/cop/rspec/capybara/match_style.rb +0 -38
  35. data/lib/rubocop/cop/rspec/capybara/negation_matcher.rb +0 -33
  36. data/lib/rubocop/cop/rspec/capybara/specific_actions.rb +0 -29
  37. data/lib/rubocop/cop/rspec/capybara/specific_finders.rb +0 -24
  38. data/lib/rubocop/cop/rspec/capybara/specific_matcher.rb +0 -35
  39. data/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +0 -36
  40. data/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +0 -35
  41. data/lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb +0 -50
  42. data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +0 -40
  43. data/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb +0 -29
  44. data/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb +0 -33
  45. data/lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb +0 -55
  46. data/lib/rubocop/cop/rspec/file_path.rb +0 -179
  47. data/lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb +0 -27
  48. data/lib/rubocop/cop/rspec/rails/have_http_status.rb +0 -35
  49. data/lib/rubocop/cop/rspec/rails/http_status.rb +0 -61
  50. data/lib/rubocop/cop/rspec/rails/inferred_spec_type.rb +0 -62
  51. data/lib/rubocop/cop/rspec/rails/minitest_assertions.rb +0 -39
  52. data/lib/rubocop/cop/rspec/rails/negation_be_valid.rb +0 -39
  53. data/lib/rubocop/cop/rspec/rails/travel_around.rb +0 -34
  54. data/lib/rubocop/rspec/language/node_pattern.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 037e1076040acc6d3c7efbeecf672ffbbff0b14752f2732681b67ea901c46086
4
- data.tar.gz: 052a969aeaebe429e598643005f9cf0a950a1f1a9e0d7e28af59db13094fb22a
3
+ metadata.gz: b85afd5fe726f641ba333b9a3ab9ffd2394e21e8fd676c8b50c971a5bb087761
4
+ data.tar.gz: 45ebceb9a51c6a4a8ebaa6233f95f2f722c99227b911badd0316c66402da6480
5
5
  SHA512:
6
- metadata.gz: abdcaf4cd68964da364c146762c911b54f33b1e244b6216fc79496b45dc9181a3ef87338a98c4559f244d1e49047427b7acbfc2e470b6f14a0a2331a8139d285
7
- data.tar.gz: 0fb5243859ef17f6fe01e3eb2bc814079a6b84f53f230f421bfdce8ed8371aab76f29aa24f174f98506cfc7566e3338b0b4d7fc98dbf3954ffce1f93ba620b4d
6
+ metadata.gz: e43baa4de2fc4be74218a939d87d8feef61f75c206a06fc004c1ace104efadb271e156c9c0b27adab8d980aac5c9217c2973d28ffc2bf8c077fd3b7dae72fad4
7
+ data.tar.gz: f12f48a9931a2dc00f6af92c55966fff4687c122fbe78e6f8f14b068033727797f023c33da3040180628c78ffd5d3adbfd860f3beffd90b9d556b761e7d24b70
data/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 3.0.0.pre (2024-06-05)
6
+
7
+ - Remove extracted cops in `Capybara`, `FactoryBot` and `Rails` departments. ([@ydah])
8
+ - Remove `RuboCop::RSpec::Language::NodePattern`. ([@ydah])
9
+ - Remove `RSpec/FilePath` cop. ([@ydah])
10
+ - Remove `RSpec/Capybara/FeatureMethods` cop. If you are using this cop, change it to use `RSpec/Dialect`. ([@ydah])
11
+ - Enable all pending cops. ([@bquorning])
12
+ - Add new `RSpec/MissingExpectationTargetMethod` cop. ([@krororo])
13
+ - Fix an error for `RSpec/ScatteredSetup` when one of the hooks is an empty block. ([@earlopain])
14
+
15
+ Read more about how to upgrade in https://docs.rubocop.org/rubocop-rspec/upgrade_to_version_3.html
16
+
17
+ ## 2.31.0 (2024-06-07)
18
+
19
+ - Support `AutoCorrect: contextual` option for LSP. ([@ydah])
20
+
5
21
  ## 2.30.0 (2024-06-03)
6
22
 
7
23
  - Add new `RSpec/ExpectInLet` cop. ([@yasu551])
@@ -889,6 +905,7 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
889
905
  [@drowze]: https://github.com/Drowze
890
906
  [@dswij]: https://github.com/dswij
891
907
  [@dvandersluis]: https://github.com/dvandersluis
908
+ [@earlopain]: https://github.com/earlopain
892
909
  [@edgibbs]: https://github.com/edgibbs
893
910
  [@eikes]: https://github.com/eikes
894
911
  [@eitoball]: https://github.com/eitoball
@@ -920,6 +937,7 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
920
937
  [@k-s-a]: https://github.com/K-S-A
921
938
  [@kellysutton]: https://github.com/kellysutton
922
939
  [@koic]: https://github.com/koic
940
+ [@krororo]: https://github.com/krororo
923
941
  [@kuahyeow]: https://github.com/kuahyeow
924
942
  [@lazycoder9]: https://github.com/lazycoder9
925
943
  [@leoarnold]: https://github.com/leoarnold
data/README.md CHANGED
@@ -81,7 +81,7 @@ In your `.rubocop.yml`, you may treat the RSpec cops just like any other
81
81
  cop. For example:
82
82
 
83
83
  ```yaml
84
- RSpec/FilePath:
84
+ RSpec/SpecFilePathFormat:
85
85
  Exclude:
86
86
  - spec/my_poorly_named_spec_file.rb
87
87
  ```
data/config/default.yml CHANGED
@@ -3,10 +3,10 @@ RSpec:
3
3
  Enabled: true
4
4
  StyleGuideBaseURL: https://rspec.rubystyle.guide
5
5
  DocumentationBaseURL: https://docs.rubocop.org/rubocop-rspec
6
- Include: &1
6
+ Include:
7
7
  - "**/*_spec.rb"
8
8
  - "**/spec/**/*"
9
- Language: &2
9
+ Language:
10
10
  inherit_mode:
11
11
  merge:
12
12
  - Expectations
@@ -146,13 +146,15 @@ RSpec/Be:
146
146
 
147
147
  RSpec/BeEmpty:
148
148
  Description: Prefer using `be_empty` when checking for an empty array.
149
- Enabled: pending
149
+ Enabled: true
150
+ AutoCorrect: contextual
150
151
  VersionAdded: '2.20'
152
+ VersionChanged: '2.31'
151
153
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty
152
154
 
153
155
  RSpec/BeEq:
154
156
  Description: Check for expectations where `be(...)` can replace `eq(...)`.
155
- Enabled: pending
157
+ Enabled: true
156
158
  Safe: false
157
159
  VersionAdded: 2.9.0
158
160
  VersionChanged: '2.16'
@@ -168,7 +170,7 @@ RSpec/BeEql:
168
170
 
169
171
  RSpec/BeNil:
170
172
  Description: Ensures a consistent style is used when matching `nil`.
171
- Enabled: pending
173
+ Enabled: true
172
174
  EnforcedStyle: be_nil
173
175
  SupportedStyles:
174
176
  - be
@@ -191,7 +193,7 @@ RSpec/BeforeAfterAll:
191
193
 
192
194
  RSpec/ChangeByZero:
193
195
  Description: Prefer negated matchers over `to change.by(0)`.
194
- Enabled: pending
196
+ Enabled: true
195
197
  VersionAdded: '2.11'
196
198
  VersionChanged: '2.14'
197
199
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero
@@ -200,7 +202,7 @@ RSpec/ChangeByZero:
200
202
  RSpec/ClassCheck:
201
203
  Description: Enforces consistent use of `be_a` or `be_kind_of`.
202
204
  StyleGuide: "#is-a-vs-kind-of"
203
- Enabled: pending
205
+ Enabled: true
204
206
  VersionAdded: '2.13'
205
207
  EnforcedStyle: be_a
206
208
  SupportedStyles:
@@ -210,7 +212,7 @@ RSpec/ClassCheck:
210
212
 
211
213
  RSpec/ContainExactly:
212
214
  Description: Checks where `contain_exactly` is used.
213
- Enabled: pending
215
+ Enabled: true
214
216
  VersionAdded: '2.19'
215
217
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContainExactly
216
218
 
@@ -304,22 +306,25 @@ RSpec/Dialect:
304
306
 
305
307
  RSpec/DuplicatedMetadata:
306
308
  Description: Avoid duplicated metadata.
307
- Enabled: pending
309
+ Enabled: true
308
310
  VersionAdded: '2.16'
309
311
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DuplicatedMetadata
310
312
 
311
313
  RSpec/EmptyExampleGroup:
312
314
  Description: Checks if an example group does not include any tests.
313
315
  Enabled: true
316
+ AutoCorrect: contextual
314
317
  SafeAutoCorrect: false
315
318
  VersionAdded: '1.7'
316
- VersionChanged: '2.13'
319
+ VersionChanged: '2.31'
317
320
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
318
321
 
319
322
  RSpec/EmptyHook:
320
323
  Description: Checks for empty before and after hooks.
321
324
  Enabled: true
325
+ AutoCorrect: contextual
322
326
  VersionAdded: '1.39'
327
+ VersionChanged: '2.31'
323
328
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
324
329
 
325
330
  RSpec/EmptyLineAfterExample:
@@ -362,19 +367,21 @@ RSpec/EmptyLineAfterSubject:
362
367
 
363
368
  RSpec/EmptyMetadata:
364
369
  Description: Avoid empty metadata hash.
365
- Enabled: pending
370
+ Enabled: true
371
+ AutoCorrect: contextual
366
372
  VersionAdded: '2.24'
373
+ VersionChanged: '2.31'
367
374
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata
368
375
 
369
376
  RSpec/EmptyOutput:
370
377
  Description: Check that the `output` matcher is not called with an empty string.
371
- Enabled: pending
378
+ Enabled: true
372
379
  VersionAdded: '2.29'
373
380
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyOutput
374
381
 
375
382
  RSpec/Eq:
376
383
  Description: Use `eq` instead of `be ==` to compare objects.
377
- Enabled: pending
384
+ Enabled: true
378
385
  VersionAdded: '2.24'
379
386
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Eq
380
387
 
@@ -416,7 +423,7 @@ RSpec/ExampleWording:
416
423
 
417
424
  RSpec/ExcessiveDocstringSpacing:
418
425
  Description: Checks for excessive whitespace in example descriptions.
419
- Enabled: pending
426
+ Enabled: true
420
427
  VersionAdded: '2.5'
421
428
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing
422
429
 
@@ -449,7 +456,7 @@ RSpec/ExpectInHook:
449
456
 
450
457
  RSpec/ExpectInLet:
451
458
  Description: Do not use `expect` in let.
452
- Enabled: pending
459
+ Enabled: true
453
460
  VersionAdded: '2.30'
454
461
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInLet
455
462
 
@@ -459,26 +466,12 @@ RSpec/ExpectOutput:
459
466
  VersionAdded: '1.10'
460
467
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
461
468
 
462
- RSpec/FilePath:
463
- Description: Checks that spec file paths are consistent and well-formed.
464
- Enabled: true
465
- Include:
466
- - "**/*_spec*rb*"
467
- - "**/spec/**/*"
468
- CustomTransform:
469
- RuboCop: rubocop
470
- RSpec: rspec
471
- IgnoreMethods: false
472
- SpecSuffixOnly: false
473
- VersionAdded: '1.2'
474
- VersionChanged: '2.24'
475
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
476
-
477
469
  RSpec/Focus:
478
470
  Description: Checks if examples are focused.
479
471
  Enabled: true
472
+ AutoCorrect: contextual
480
473
  VersionAdded: '1.5'
481
- VersionChanged: '2.1'
474
+ VersionChanged: '2.31'
482
475
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
483
476
 
484
477
  RSpec/HookArgument:
@@ -496,12 +489,14 @@ RSpec/HookArgument:
496
489
  RSpec/HooksBeforeExamples:
497
490
  Description: Checks for before/around/after hooks that come after an example.
498
491
  Enabled: true
492
+ AutoCorrect: contextual
499
493
  VersionAdded: '1.29'
494
+ VersionChanged: '2.31'
500
495
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
501
496
 
502
497
  RSpec/IdenticalEqualityAssertion:
503
498
  Description: Checks for equality assertions with identical expressions on both sides.
504
- Enabled: pending
499
+ Enabled: true
505
500
  VersionAdded: '2.4'
506
501
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion
507
502
 
@@ -538,7 +533,7 @@ RSpec/ImplicitSubject:
538
533
 
539
534
  RSpec/IndexedLet:
540
535
  Description: Do not set up test data using indexes (e.g., `item_1`, `item_2`).
541
- Enabled: pending
536
+ Enabled: true
542
537
  VersionAdded: '2.20'
543
538
  VersionChanged: '2.23'
544
539
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IndexedLet
@@ -563,7 +558,7 @@ RSpec/InstanceVariable:
563
558
 
564
559
  RSpec/IsExpectedSpecify:
565
560
  Description: Check for `specify` with `is_expected` and one-liner expectations.
566
- Enabled: pending
561
+ Enabled: true
567
562
  VersionAdded: '2.27'
568
563
  StyleGuide: https://rspec.rubystyle.guide/#it-and-specify
569
564
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IsExpectedSpecify
@@ -602,8 +597,9 @@ RSpec/LeakyConstantDeclaration:
602
597
  RSpec/LetBeforeExamples:
603
598
  Description: Checks for `let` definitions that come after an example.
604
599
  Enabled: true
600
+ AutoCorrect: contextual
605
601
  VersionAdded: '1.16'
606
- VersionChanged: '1.22'
602
+ VersionChanged: '2.31'
607
603
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
608
604
 
609
605
  RSpec/LetSetup:
@@ -614,7 +610,7 @@ RSpec/LetSetup:
614
610
 
615
611
  RSpec/MatchArray:
616
612
  Description: Checks where `match_array` is used.
617
- Enabled: pending
613
+ Enabled: true
618
614
  VersionAdded: '2.19'
619
615
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MatchArray
620
616
 
@@ -647,7 +643,7 @@ RSpec/MessageSpies:
647
643
 
648
644
  RSpec/MetadataStyle:
649
645
  Description: Use consistent metadata style.
650
- Enabled: pending
646
+ Enabled: true
651
647
  EnforcedStyle: symbol
652
648
  SupportedStyles:
653
649
  - hash
@@ -661,6 +657,12 @@ RSpec/MissingExampleGroupArgument:
661
657
  VersionAdded: '1.28'
662
658
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
663
659
 
660
+ RSpec/MissingExpectationTargetMethod:
661
+ Description: Checks if `.to`, `not_to` or `to_not` are used.
662
+ Enabled: true
663
+ VersionAdded: '3.0'
664
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExpectationTargetMethod
665
+
664
666
  RSpec/MultipleDescribes:
665
667
  Description: Checks for multiple top-level example groups.
666
668
  Enabled: true
@@ -715,7 +717,7 @@ RSpec/NestedGroups:
715
717
 
716
718
  RSpec/NoExpectationExample:
717
719
  Description: Checks if an example contains any expectation.
718
- Enabled: pending
720
+ Enabled: true
719
721
  Safe: false
720
722
  VersionAdded: '2.13'
721
723
  VersionChanged: '2.14'
@@ -748,7 +750,7 @@ RSpec/Pending:
748
750
 
749
751
  RSpec/PendingWithoutReason:
750
752
  Description: Checks for pending or skipped examples without reason.
751
- Enabled: pending
753
+ Enabled: true
752
754
  VersionAdded: '2.16'
753
755
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PendingWithoutReason
754
756
 
@@ -774,7 +776,7 @@ RSpec/ReceiveCounts:
774
776
 
775
777
  RSpec/ReceiveMessages:
776
778
  Description: Checks for multiple messages stubbed on the same object.
777
- Enabled: pending
779
+ Enabled: true
778
780
  SafeAutoCorrect: false
779
781
  VersionAdded: '2.23'
780
782
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveMessages
@@ -787,19 +789,19 @@ RSpec/ReceiveNever:
787
789
 
788
790
  RSpec/RedundantAround:
789
791
  Description: Remove redundant `around` hook.
790
- Enabled: pending
792
+ Enabled: true
791
793
  VersionAdded: '2.19'
792
794
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantAround
793
795
 
794
796
  RSpec/RedundantPredicateMatcher:
795
797
  Description: Checks for redundant predicate matcher.
796
- Enabled: pending
798
+ Enabled: true
797
799
  VersionAdded: '2.26'
798
800
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantPredicateMatcher
799
801
 
800
802
  RSpec/RemoveConst:
801
803
  Description: Checks that `remove_const` is not used in specs.
802
- Enabled: pending
804
+ Enabled: true
803
805
  VersionAdded: '2.26'
804
806
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RemoveConst
805
807
 
@@ -835,7 +837,7 @@ RSpec/RepeatedIncludeExample:
835
837
 
836
838
  RSpec/RepeatedSubjectCall:
837
839
  Description: Checks for repeated calls to subject missing that it is memoized.
838
- Enabled: pending
840
+ Enabled: true
839
841
  VersionAdded: '2.27'
840
842
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedSubjectCall
841
843
 
@@ -853,14 +855,17 @@ RSpec/ReturnFromStub:
853
855
  RSpec/ScatteredLet:
854
856
  Description: Checks for let scattered across the example group.
855
857
  Enabled: true
858
+ AutoCorrect: contextual
856
859
  VersionAdded: '1.14'
857
- VersionChanged: '1.39'
860
+ VersionChanged: '2.31'
858
861
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
859
862
 
860
863
  RSpec/ScatteredSetup:
861
864
  Description: Checks for setup scattered across multiple hooks in an example group.
862
865
  Enabled: true
866
+ AutoCorrect: contextual
863
867
  VersionAdded: '1.10'
868
+ VersionChanged: '2.31'
864
869
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
865
870
 
866
871
  RSpec/SharedContext:
@@ -889,19 +894,19 @@ RSpec/SingleArgumentMessageChain:
889
894
 
890
895
  RSpec/SkipBlockInsideExample:
891
896
  Description: Checks for passing a block to `skip` within examples.
892
- Enabled: pending
897
+ Enabled: true
893
898
  VersionAdded: '2.19'
894
899
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SkipBlockInsideExample
895
900
 
896
901
  RSpec/SortMetadata:
897
902
  Description: Sort RSpec metadata alphabetically.
898
- Enabled: pending
903
+ Enabled: true
899
904
  VersionAdded: '2.14'
900
905
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SortMetadata
901
906
 
902
907
  RSpec/SpecFilePathFormat:
903
908
  Description: Checks that spec file paths are consistent and well-formed.
904
- Enabled: pending
909
+ Enabled: true
905
910
  Include:
906
911
  - "**/*_spec.rb"
907
912
  Exclude:
@@ -917,7 +922,7 @@ RSpec/SpecFilePathFormat:
917
922
 
918
923
  RSpec/SpecFilePathSuffix:
919
924
  Description: Checks that spec file paths suffix are consistent and well-formed.
920
- Enabled: pending
925
+ Enabled: true
921
926
  VersionAdded: '2.24'
922
927
  Include:
923
928
  - "**/*_spec*rb*"
@@ -932,7 +937,7 @@ RSpec/StubbedMock:
932
937
 
933
938
  RSpec/SubjectDeclaration:
934
939
  Description: Ensure that subject is defined using subject helper.
935
- Enabled: pending
940
+ Enabled: true
936
941
  VersionAdded: '2.5'
937
942
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectDeclaration
938
943
 
@@ -946,7 +951,7 @@ RSpec/SubjectStub:
946
951
 
947
952
  RSpec/UndescriptiveLiteralsDescription:
948
953
  Description: Description should be descriptive.
949
- Enabled: pending
954
+ Enabled: true
950
955
  VersionAdded: '2.29'
951
956
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UndescriptiveLiteralsDescription
952
957
 
@@ -980,7 +985,7 @@ RSpec/VariableName:
980
985
 
981
986
  RSpec/VerifiedDoubleReference:
982
987
  Description: Checks for consistent verified double reference style.
983
- Enabled: pending
988
+ Enabled: true
984
989
  SafeAutoCorrect: false
985
990
  EnforcedStyle: constant
986
991
  SupportedStyles:
@@ -1011,216 +1016,3 @@ RSpec/Yield:
1011
1016
  Enabled: true
1012
1017
  VersionAdded: '1.32'
1013
1018
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
1014
-
1015
- RSpec/Capybara:
1016
- Enabled: true
1017
- Include: *1
1018
- Language: *2
1019
-
1020
- RSpec/Capybara/CurrentPathExpectation:
1021
- Description: Checks that no expectations are set on Capybara's `current_path`.
1022
- Enabled: true
1023
- VersionAdded: '1.18'
1024
- VersionChanged: '2.0'
1025
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
1026
-
1027
- RSpec/Capybara/FeatureMethods:
1028
- Description: Checks for consistent method usage in feature specs.
1029
- Enabled: true
1030
- EnabledMethods: []
1031
- VersionAdded: '1.17'
1032
- VersionChanged: '2.0'
1033
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
1034
-
1035
- RSpec/Capybara/MatchStyle:
1036
- Description: Checks for usage of deprecated style methods.
1037
- Enabled: pending
1038
- VersionAdded: '2.17'
1039
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/MatchStyle
1040
-
1041
- RSpec/Capybara/NegationMatcher:
1042
- Description: Enforces use of `have_no_*` or `not_to` for negated expectations.
1043
- Enabled: pending
1044
- VersionAdded: '2.14'
1045
- EnforcedStyle: not_to
1046
- SupportedStyles:
1047
- - have_no
1048
- - not_to
1049
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/NegationMatcher
1050
-
1051
- RSpec/Capybara/SpecificActions:
1052
- Description: Checks for there is a more specific actions offered by Capybara.
1053
- Enabled: pending
1054
- VersionAdded: '2.14'
1055
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificActions
1056
-
1057
- RSpec/Capybara/SpecificFinders:
1058
- Description: Checks if there is a more specific finder offered by Capybara.
1059
- Enabled: pending
1060
- VersionAdded: '2.13'
1061
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificFinders
1062
-
1063
- RSpec/Capybara/SpecificMatcher:
1064
- Description: Checks for there is a more specific matcher offered by Capybara.
1065
- Enabled: pending
1066
- VersionAdded: '2.12'
1067
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificMatcher
1068
-
1069
- RSpec/Capybara/VisibilityMatcher:
1070
- Description: Checks for boolean visibility in Capybara finders.
1071
- Enabled: true
1072
- VersionAdded: '1.39'
1073
- VersionChanged: '2.0'
1074
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
1075
-
1076
- RSpec/FactoryBot:
1077
- Enabled: true
1078
- Include: *1
1079
- Language: *2
1080
-
1081
- RSpec/FactoryBot/AttributeDefinedStatically:
1082
- Description: Always declare attribute values as blocks.
1083
- Enabled: true
1084
- Include:
1085
- - "**/spec/factories.rb"
1086
- - "**/spec/factories/**/*.rb"
1087
- - "**/features/support/factories/**/*.rb"
1088
- VersionAdded: '1.28'
1089
- VersionChanged: '2.23'
1090
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
1091
-
1092
- RSpec/FactoryBot/ConsistentParenthesesStyle:
1093
- Description: Use a consistent style for parentheses in factory bot calls.
1094
- Enabled: pending
1095
- EnforcedStyle: require_parentheses
1096
- SupportedStyles:
1097
- - require_parentheses
1098
- - omit_parentheses
1099
- VersionAdded: '2.14'
1100
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/ConsistentParenthesesStyle
1101
-
1102
- RSpec/FactoryBot/CreateList:
1103
- Description: Checks for create_list usage.
1104
- Enabled: true
1105
- Include:
1106
- - "**/*_spec.rb"
1107
- - "**/spec/**/*"
1108
- - "**/spec/factories.rb"
1109
- - "**/spec/factories/**/*.rb"
1110
- - "**/features/support/factories/**/*.rb"
1111
- EnforcedStyle: create_list
1112
- SupportedStyles:
1113
- - create_list
1114
- - n_times
1115
- VersionAdded: '1.25'
1116
- VersionChanged: '2.23'
1117
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
1118
-
1119
- RSpec/FactoryBot/FactoryClassName:
1120
- Description: Use string value when setting the class attribute explicitly.
1121
- Enabled: true
1122
- Include:
1123
- - "**/spec/factories.rb"
1124
- - "**/spec/factories/**/*.rb"
1125
- - "**/features/support/factories/**/*.rb"
1126
- VersionAdded: '1.37'
1127
- VersionChanged: '2.23'
1128
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
1129
-
1130
- RSpec/FactoryBot/FactoryNameStyle:
1131
- Description: Checks for name style for argument of FactoryBot::Syntax::Methods.
1132
- Enabled: pending
1133
- VersionAdded: '2.16'
1134
- EnforcedStyle: symbol
1135
- SupportedStyles:
1136
- - symbol
1137
- - string
1138
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryNameStyle
1139
-
1140
- RSpec/FactoryBot/SyntaxMethods:
1141
- Description: Use shorthands from `FactoryBot::Syntax::Methods` in your specs.
1142
- Enabled: pending
1143
- SafeAutoCorrect: false
1144
- VersionAdded: '2.7'
1145
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/SyntaxMethods
1146
-
1147
- RSpec/Rails:
1148
- Enabled: true
1149
- Include: *1
1150
- Language: *2
1151
-
1152
- RSpec/Rails/AvoidSetupHook:
1153
- Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
1154
- Enabled: pending
1155
- VersionAdded: '2.4'
1156
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook
1157
-
1158
- RSpec/Rails/HaveHttpStatus:
1159
- Description: Checks that tests use `have_http_status` instead of equality matchers.
1160
- Enabled: pending
1161
- ResponseMethods:
1162
- - response
1163
- - last_response
1164
- SafeAutoCorrect: false
1165
- VersionAdded: '2.12'
1166
- VersionChanged: '2.27'
1167
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HaveHttpStatus
1168
-
1169
- RSpec/Rails/HttpStatus:
1170
- Description: Enforces use of symbolic or numeric value to describe HTTP status.
1171
- Enabled: true
1172
- EnforcedStyle: symbolic
1173
- SupportedStyles:
1174
- - numeric
1175
- - symbolic
1176
- - be_status
1177
- VersionAdded: '1.23'
1178
- VersionChanged: '2.20'
1179
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
1180
-
1181
- RSpec/Rails/InferredSpecType:
1182
- Description: Identifies redundant spec type.
1183
- Enabled: pending
1184
- Safe: false
1185
- VersionAdded: '2.14'
1186
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/InferredSpecType
1187
- Inferences:
1188
- channels: channel
1189
- controllers: controller
1190
- features: feature
1191
- generator: generator
1192
- helpers: helper
1193
- jobs: job
1194
- mailboxes: mailbox
1195
- mailers: mailer
1196
- models: model
1197
- requests: request
1198
- integration: request
1199
- api: request
1200
- routing: routing
1201
- system: system
1202
- views: view
1203
-
1204
- RSpec/Rails/MinitestAssertions:
1205
- Description: Check if using Minitest-like matchers.
1206
- Enabled: pending
1207
- VersionAdded: '2.17'
1208
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/MinitestAssertions
1209
-
1210
- RSpec/Rails/NegationBeValid:
1211
- Description: Enforces use of `be_invalid` or `not_to` for negated be_valid.
1212
- Safe: false
1213
- EnforcedStyle: not_to
1214
- SupportedStyles:
1215
- - not_to
1216
- - be_invalid
1217
- Enabled: pending
1218
- VersionAdded: '2.23'
1219
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/NegationBeValid
1220
-
1221
- RSpec/Rails/TravelAround:
1222
- Description: Prefer to travel in `before` rather than `around`.
1223
- Enabled: pending
1224
- Safe: false
1225
- VersionAdded: '2.19'
1226
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/TravelAround
@@ -34,3 +34,14 @@ renamed:
34
34
  RSpec/Rails/MinitestAssertions: RSpecRails/MinitestAssertions
35
35
  RSpec/Rails/NegationBeValid: RSpecRails/NegationBeValid
36
36
  RSpec/Rails/TravelAround: RSpecRails/TravelAround
37
+
38
+ split:
39
+ RSpec/FilePath:
40
+ alternatives:
41
+ - RSpec/SpecFilePathFormat
42
+ - RSpec/SpecFilePathSuffix
43
+
44
+ removed:
45
+ RSpec/Capybara/FeatureMethods:
46
+ reason: >
47
+ this cop has migrated to `RSpec/Dialect`. Please use `RSpec/Dialect` instead
@@ -6,7 +6,6 @@ module RuboCop
6
6
  # @abstract parent class to RSpec cops
7
7
  class Base < ::RuboCop::Cop::Base
8
8
  include RuboCop::RSpec::Language
9
- extend RuboCop::RSpec::Language::NodePattern
10
9
 
11
10
  exclude_from_registry
12
11