rubocop-rspec 1.38.1 → 1.43.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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +57 -0
  3. data/CODE_OF_CONDUCT.md +17 -0
  4. data/README.md +1 -61
  5. data/config/default.yml +159 -19
  6. data/lib/rubocop-rspec.rb +5 -2
  7. data/lib/rubocop/cop/rspec/align_left_let_brace.rb +12 -19
  8. data/lib/rubocop/cop/rspec/align_right_let_brace.rb +12 -19
  9. data/lib/rubocop/cop/rspec/any_instance.rb +1 -1
  10. data/lib/rubocop/cop/rspec/around_block.rb +1 -1
  11. data/lib/rubocop/cop/rspec/base.rb +74 -0
  12. data/lib/rubocop/cop/rspec/be.rb +2 -2
  13. data/lib/rubocop/cop/rspec/be_eql.rb +6 -6
  14. data/lib/rubocop/cop/rspec/before_after_all.rb +1 -1
  15. data/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +19 -17
  16. data/lib/rubocop/cop/rspec/capybara/feature_methods.rb +14 -12
  17. data/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +69 -0
  18. data/lib/rubocop/cop/rspec/context_method.rb +7 -9
  19. data/lib/rubocop/cop/rspec/context_wording.rb +3 -3
  20. data/lib/rubocop/cop/rspec/cop.rb +3 -87
  21. data/lib/rubocop/cop/rspec/describe_class.rb +29 -23
  22. data/lib/rubocop/cop/rspec/describe_method.rb +14 -7
  23. data/lib/rubocop/cop/rspec/describe_symbol.rb +2 -2
  24. data/lib/rubocop/cop/rspec/described_class.rb +12 -9
  25. data/lib/rubocop/cop/rspec/described_class_module_wrapping.rb +1 -1
  26. data/lib/rubocop/cop/rspec/dialect.rb +5 -12
  27. data/lib/rubocop/cop/rspec/empty_example_group.rb +91 -7
  28. data/lib/rubocop/cop/rspec/empty_hook.rb +46 -0
  29. data/lib/rubocop/cop/rspec/empty_line_after_example.rb +5 -7
  30. data/lib/rubocop/cop/rspec/empty_line_after_example_group.rb +5 -9
  31. data/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +8 -8
  32. data/lib/rubocop/cop/rspec/empty_line_after_hook.rb +5 -9
  33. data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +6 -6
  34. data/lib/rubocop/cop/rspec/example_length.rb +1 -1
  35. data/lib/rubocop/cop/rspec/example_without_description.rb +1 -1
  36. data/lib/rubocop/cop/rspec/example_wording.rb +10 -11
  37. data/lib/rubocop/cop/rspec/expect_actual.rb +8 -11
  38. data/lib/rubocop/cop/rspec/expect_change.rb +10 -35
  39. data/lib/rubocop/cop/rspec/expect_in_hook.rb +3 -3
  40. data/lib/rubocop/cop/rspec/expect_output.rb +2 -2
  41. data/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +24 -21
  42. data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +20 -22
  43. data/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb +7 -8
  44. data/lib/rubocop/cop/rspec/file_path.rb +57 -21
  45. data/lib/rubocop/cop/rspec/focus.rb +7 -11
  46. data/lib/rubocop/cop/rspec/hook_argument.rb +16 -23
  47. data/lib/rubocop/cop/rspec/hooks_before_examples.rb +10 -29
  48. data/lib/rubocop/cop/rspec/implicit_block_expectation.rb +1 -1
  49. data/lib/rubocop/cop/rspec/implicit_expect.rb +7 -15
  50. data/lib/rubocop/cop/rspec/implicit_subject.rb +16 -11
  51. data/lib/rubocop/cop/rspec/instance_spy.rb +18 -12
  52. data/lib/rubocop/cop/rspec/instance_variable.rb +4 -8
  53. data/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb +3 -6
  54. data/lib/rubocop/cop/rspec/it_behaves_like.rb +5 -6
  55. data/lib/rubocop/cop/rspec/iterated_expectation.rb +1 -1
  56. data/lib/rubocop/cop/rspec/leading_subject.rb +22 -26
  57. data/lib/rubocop/cop/rspec/leaky_constant_declaration.rb +2 -5
  58. data/lib/rubocop/cop/rspec/let_before_examples.rb +10 -26
  59. data/lib/rubocop/cop/rspec/let_setup.rb +21 -6
  60. data/lib/rubocop/cop/rspec/message_chain.rb +7 -6
  61. data/lib/rubocop/cop/rspec/message_expectation.rb +2 -2
  62. data/lib/rubocop/cop/rspec/message_spies.rb +2 -3
  63. data/lib/rubocop/cop/rspec/missing_example_group_argument.rb +1 -1
  64. data/lib/rubocop/cop/rspec/multiple_describes.rb +11 -8
  65. data/lib/rubocop/cop/rspec/multiple_expectations.rb +7 -11
  66. data/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +148 -0
  67. data/lib/rubocop/cop/rspec/multiple_subjects.rb +18 -19
  68. data/lib/rubocop/cop/rspec/named_subject.rb +8 -8
  69. data/lib/rubocop/cop/rspec/nested_groups.rb +12 -13
  70. data/lib/rubocop/cop/rspec/not_to_not.rb +5 -6
  71. data/lib/rubocop/cop/rspec/overwriting_setup.rb +1 -1
  72. data/lib/rubocop/cop/rspec/pending.rb +1 -1
  73. data/lib/rubocop/cop/rspec/predicate_matcher.rb +32 -69
  74. data/lib/rubocop/cop/rspec/rails/http_status.rb +7 -9
  75. data/lib/rubocop/cop/rspec/receive_counts.rb +15 -17
  76. data/lib/rubocop/cop/rspec/receive_never.rb +12 -12
  77. data/lib/rubocop/cop/rspec/repeated_description.rb +1 -1
  78. data/lib/rubocop/cop/rspec/repeated_example.rb +2 -2
  79. data/lib/rubocop/cop/rspec/repeated_example_group_body.rb +12 -2
  80. data/lib/rubocop/cop/rspec/repeated_example_group_description.rb +1 -1
  81. data/lib/rubocop/cop/rspec/return_from_stub.rb +12 -22
  82. data/lib/rubocop/cop/rspec/scattered_let.rb +12 -2
  83. data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
  84. data/lib/rubocop/cop/rspec/shared_context.rb +8 -21
  85. data/lib/rubocop/cop/rspec/shared_examples.rb +7 -9
  86. data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +15 -18
  87. data/lib/rubocop/cop/rspec/subject_stub.rb +25 -53
  88. data/lib/rubocop/cop/rspec/unspecified_exception.rb +1 -1
  89. data/lib/rubocop/cop/rspec/variable_definition.rb +56 -0
  90. data/lib/rubocop/cop/rspec/variable_name.rb +66 -0
  91. data/lib/rubocop/cop/rspec/verified_doubles.rb +1 -1
  92. data/lib/rubocop/cop/rspec/void_expect.rb +1 -1
  93. data/lib/rubocop/cop/rspec/yield.rb +14 -11
  94. data/lib/rubocop/cop/rspec_cops.rb +6 -1
  95. data/lib/rubocop/rspec/corrector/move_node.rb +54 -0
  96. data/lib/rubocop/rspec/description_extractor.rb +2 -6
  97. data/lib/rubocop/rspec/{blank_line_separation.rb → empty_line_separation.rb} +13 -10
  98. data/lib/rubocop/rspec/example_group.rb +21 -49
  99. data/lib/rubocop/rspec/factory_bot.rb +7 -1
  100. data/lib/rubocop/rspec/language.rb +13 -3
  101. data/lib/rubocop/rspec/language/node_pattern.rb +11 -2
  102. data/lib/rubocop/rspec/top_level_describe.rb +2 -2
  103. data/lib/rubocop/rspec/top_level_group.rb +55 -0
  104. data/lib/rubocop/rspec/variable.rb +16 -0
  105. data/lib/rubocop/rspec/version.rb +1 -1
  106. metadata +36 -13
  107. data/lib/rubocop/rspec/util.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29dceb0d781f6ba1f1ad5ec94edff9c04c19223eb2d0be2d0e727cefc160e133
4
- data.tar.gz: 2ae835d2db78c365c46ebed92907b375c3d649e4446035351b21b85fad732718
3
+ metadata.gz: afae94ff975b0caf19f7aa7cad514296a15cb28afc2c4ae18dba8bb8446290d2
4
+ data.tar.gz: 15fa2c9138a72d6c54247ea384793abbf9c3d6f8eaa2d7346803c8a296b7335c
5
5
  SHA512:
6
- metadata.gz: 8ad6ec4d0fd1b3e87d00563de947b31b3b3b22f80e08782c57003dcd9972bb3b802d59498423a30318a4f5905a634566e803521852becc0da43222a6165913b2
7
- data.tar.gz: 7afaeb5b2f202ac0aa6b2480e00cf5bac72812c40aa43c236d3fcf3b0830314249686c9e3b6dcc4495c5e6db47ab142aeeb8a86c0488efb0c8893f2acedcf486
6
+ metadata.gz: 4552fb307a57b49ed209ac12a30744b97cfd5bc57460a2a385a16a176903f439083a634e92a8f4faf308c3cca570a79bc8ba85b8a51ceff295920614f1bfe95b
7
+ data.tar.gz: f6b9ed4c0d486fb41c477f6b9d95b7a8897b2011f80bc91edd1a872dca11fce0e5de05387f5e0a3112a0849f371fa93c1eba220019ff5b81ba9959daf06e089c
@@ -2,6 +2,49 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 1.43.0 (2020-08-17)
6
+
7
+ * Add a new base cop class `::RuboCop::Cop::RSpec::Base`. The old base class `::RuboCop::Cop::RSpec::Cop` is deprecated, and will be removed in the next major release. ([@bquorning][])
8
+ * Add support for subject detection after includes and example groups in `RSpec/LeadingSubject`. ([@pirj][])
9
+ * Ignore trailing punctuation in context description prefix. ([@elliterate][])
10
+ * Relax `RSpec/VariableDefinition` cop so interpolated and multiline strings are accepted even when configured to enforce the `symbol` style. ([@bquorning][])
11
+ * Fix `RSpec/EmptyExampleGroup` to flag example groups with examples in invalid scopes. ([@mlarraz][])
12
+ * Fix `RSpec/EmptyExampleGroup` to ignore examples groups with examples defined inside iterators. ([@pirj][])
13
+ * Improve `RSpec/NestedGroups`, `RSpec/FilePath`, `RSpec/DescribeMethod`, `RSpec/MultipleDescribes`, `RSpec/DescribeClass`'s top-level example group detection. ([@pirj][])
14
+ * Add detection of `let!` with a block-pass or a string literal to `RSpec/LetSetup`. ([@pirj][])
15
+ * Add `IgnoredPatterns` configuration option to `RSpec/VariableName`. ([@jtannas][])
16
+ * Add `RSpec/MultipleMemoizedHelpers` cop. ([@mockdeep][])
17
+
18
+ ## 1.42.0 (2020-07-09)
19
+
20
+ * Update RuboCop dependency to 0.87.0 because of changes to internal APIs. ([@bquorning][], [@Darhazer][])
21
+
22
+ ## 1.41.0 (2020-07-03)
23
+
24
+ * Extend the list of Rails spec types for `RSpec/DescribeClass`. ([@pirj][])
25
+ * Fix `FactoryBot/AttributeDefinedStatically` to allow `#traits_for_enum` without a block. ([@harrylewis][])
26
+ * Improve the performance of `FactoryBot/AttributeDefinedStatically`, `RSpec/InstanceVariable`, `RSpec/LetSetup`, `RSpec/NestedGroups` and `RSpec/ReturnFromStub`. ([@andrykonchin][])
27
+
28
+ ## 1.40.0 (2020-06-11)
29
+
30
+ * Add new `RSpec/VariableName` cop. ([@tejasbubane][])
31
+ * Add new `RSpec/VariableDefinition` cop. ([@tejasbubane][])
32
+ * Expand `Capybara/VisibilityMatcher` to support more than just `have_selector`. ([@twalpole][])
33
+ * Add new `SpecSuffixOnly` option to `RSpec/FilePath` cop. ([@zdennis][])
34
+ * Allow `RSpec/RepeatedExampleGroupBody` to differ only by described_class. ([@robotdana][])
35
+ * Fix `RSpec/FilePath` detection across sibling directories. ([@rolfschmidt][])
36
+ * Improve the performance of `RSpec/SubjectStub` by an order of magnitude. ([@andrykonchin][])
37
+
38
+ ## 1.39.0 (2020-05-01)
39
+
40
+ * Fix `RSpec/FilePath` detection when absolute path includes test subject. ([@eitoball][])
41
+ * Add new `Capybara/VisibilityMatcher` cop. ([@aried3r][])
42
+ * Ignore String constants by `RSpec/Describe`. ([@AlexWayfer][])
43
+ * Drop support for ruby 2.3. ([@bquorning][])
44
+ * Fix multiple cops to detect `let` with proc argument. ([@tejasbubane][])
45
+ * Add autocorrect support for `RSpec/ScatteredLet`. ([@Darhazer][])
46
+ * Add new `RSpec/EmptyHook` cop. ([@tejasbubane][])
47
+
5
48
  ## 1.38.1 (2020-02-15)
6
49
 
7
50
  * Fix `RSpec/RepeatedDescription` to detect descriptions with interpolation and methods. ([@lazycoder9][])
@@ -489,3 +532,17 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
489
532
  [@dduugg]: https://github.com/dduugg
490
533
  [@lazycoder9]: https://github.com/lazycoder9
491
534
  [@elebow]: https://github.com/elebow
535
+ [@eitoball]: https://github.com/eitoball
536
+ [@aried3r]: https://github.com/aried3r
537
+ [@AlexWayfer]: https://github.com/AlexWayfer
538
+ [@tejasbubane]: https://github.com/tejasbubane
539
+ [@twalpole]: https://github.com/twalpole
540
+ [@zdennis]: https://github.com/zdennis
541
+ [@robotdana]: https://github.com/robotdana
542
+ [@rolfschmidt]: https://github.com/rolfschmidt
543
+ [@andrykonchin]: https://github.com/andrykonchin
544
+ [@harrylewis]: https://github.com/harrylewis
545
+ [@elliterate]: https://github.com/elliterate
546
+ [@mlarraz]: https://github.com/mlarraz
547
+ [@jtannas]: https://github.com/jtannas
548
+ [@mockdeep]: https://github.com/mockdeep
@@ -0,0 +1,17 @@
1
+ # The RuboCop Community Code of Conduct
2
+
3
+ **Note:** We have picked the following code of conduct based on [Ruby's own
4
+ code of conduct](https://www.ruby-lang.org/en/conduct/).
5
+
6
+ This document provides a few simple community guidelines for a safe, respectful,
7
+ productive, and collaborative place for any person who is willing to contribute
8
+ to the RuboCop community. It applies to all "collaborative spaces", which are
9
+ defined as community communications channels (such as mailing lists, submitted
10
+ patches, commit comments, etc.).
11
+
12
+ * Participants will be tolerant of opposing views.
13
+ * Participants must ensure that their language and actions are free of personal
14
+ attacks and disparaging personal remarks.
15
+ * When interpreting the words and actions of others, participants should always
16
+ assume good intentions.
17
+ * Behaviour which can be reasonably considered harassment will not be tolerated.
data/README.md CHANGED
@@ -67,27 +67,7 @@ rubocop-rspec is available on Code Climate as part of the rubocop engine. [Learn
67
67
 
68
68
  ## Documentation
69
69
 
70
- You can read more about RuboCop-RSpec in its [official manual](http://rubocop-rspec.readthedocs.io).
71
-
72
- ## Inspecting files that don't end with `_spec.rb`
73
-
74
- By default, `rubocop-rspec` only inspects code within paths ending in `_spec.rb` or including `spec/`. You can override this setting in your config file by specifying one or more patterns:
75
-
76
- ```yaml
77
- # Inspect all files
78
- AllCops:
79
- RSpec:
80
- Patterns:
81
- - '.+'
82
- ```
83
-
84
- ```yaml
85
- # Inspect only files ending with `_test.rb`
86
- AllCops:
87
- RSpec:
88
- Patterns:
89
- - '_test.rb$'
90
- ```
70
+ You can read more about RuboCop-RSpec in its [official manual](https://docs.rubocop.org/rubocop-rspec).
91
71
 
92
72
  ## The Cops
93
73
 
@@ -104,46 +84,6 @@ RSpec/FilePath:
104
84
  - spec/my_poorly_named_spec_file.rb
105
85
  ```
106
86
 
107
- ## Non-goals of RuboCop RSpec
108
-
109
- ### Enforcing `should` vs. `expect` syntax
110
-
111
- Enforcing
112
-
113
- ```ruby
114
- expect(calculator.compute(line_item)).to eq(5)
115
- ```
116
-
117
- over
118
-
119
- ```ruby
120
- calculator.compute(line_item).should == 5
121
- ```
122
-
123
- is a feature of RSpec itself – you can read about it in the [RSpec Documentation](https://relishapp.com/rspec/rspec-expectations/docs/syntax-configuration#disable-should-syntax)
124
-
125
- ### Enforcing an explicit RSpec receiver for top-level methods (disabling monkey patching)
126
-
127
- Enforcing
128
-
129
- ```ruby
130
- RSpec.describe MyClass do
131
- ...
132
- end
133
- ```
134
-
135
- over
136
-
137
- ```ruby
138
- describe MyClass do
139
- ...
140
- end
141
- ```
142
-
143
- can be achieved using RSpec's `disable_monkey_patching!` method, which you can read more about in the [RSpec Documentation](https://relishapp.com/rspec/rspec-core/v/3-7/docs/configuration/zero-monkey-patching-mode#monkey-patched-methods-are-undefined-with-%60disable-monkey-patching!%60). This will also prevent `should` from being defined on every object in your system.
144
-
145
- Before disabling `should` you will need all your specs to use the `expect` syntax. You can use [Transpec](http://yujinakayama.me/transpec/), which will do the conversion for you.
146
-
147
87
  ## Contributing
148
88
 
149
89
  Checkout the [contribution guidelines](.github/CONTRIBUTING.md).
@@ -13,31 +13,37 @@ AllCops:
13
13
  RSpec/AlignLeftLetBrace:
14
14
  Description: Checks that left braces for adjacent single line lets are aligned.
15
15
  Enabled: false
16
+ VersionAdded: '1.16'
16
17
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace
17
18
 
18
19
  RSpec/AlignRightLetBrace:
19
20
  Description: Checks that right braces for adjacent single line lets are aligned.
20
21
  Enabled: false
22
+ VersionAdded: '1.16'
21
23
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace
22
24
 
23
25
  RSpec/AnyInstance:
24
26
  Description: Check that instances are not being stubbed globally.
25
27
  Enabled: true
28
+ VersionAdded: '1.4'
26
29
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance
27
30
 
28
31
  RSpec/AroundBlock:
29
32
  Description: Checks that around blocks actually run the test.
30
33
  Enabled: true
34
+ VersionAdded: '1.11'
31
35
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock
32
36
 
33
37
  RSpec/Be:
34
38
  Description: Check for expectations where `be` is used without argument.
35
39
  Enabled: true
40
+ VersionAdded: '1.25'
36
41
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
37
42
 
38
43
  RSpec/BeEql:
39
44
  Description: Check for expectations where `be(...)` can replace `eql(...)`.
40
45
  Enabled: true
46
+ VersionAdded: '1.7'
41
47
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
42
48
 
43
49
  RSpec/BeforeAfterAll:
@@ -47,11 +53,13 @@ RSpec/BeforeAfterAll:
47
53
  - spec/spec_helper.rb
48
54
  - spec/rails_helper.rb
49
55
  - spec/support/**/*.rb
56
+ VersionAdded: '1.12'
50
57
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
51
58
 
52
59
  RSpec/ContextMethod:
53
60
  Description: "`context` should not be used for specifying methods."
54
61
  Enabled: true
62
+ VersionAdded: '1.36'
55
63
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod
56
64
 
57
65
  RSpec/ContextWording:
@@ -61,80 +69,103 @@ RSpec/ContextWording:
61
69
  - when
62
70
  - with
63
71
  - without
72
+ VersionAdded: '1.20'
73
+ VersionChanged: 1.20.1
64
74
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
65
75
 
66
76
  RSpec/DescribeClass:
67
- Description: Check that the first argument to the top level describe is a constant.
77
+ Description: Check that the first argument to the top-level describe is a constant.
68
78
  Enabled: true
79
+ VersionAdded: '1.0'
69
80
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
70
81
 
71
82
  RSpec/DescribeMethod:
72
83
  Description: Checks that the second argument to `describe` specifies a method.
73
84
  Enabled: true
85
+ VersionAdded: '1.0'
74
86
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod
75
87
 
76
88
  RSpec/DescribeSymbol:
77
89
  Description: Avoid describing symbols.
78
90
  Enabled: true
91
+ VersionAdded: '1.15'
79
92
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol
80
93
 
81
94
  RSpec/DescribedClass:
82
95
  Description: Checks that tests use `described_class`.
83
- SkipBlocks: false
84
96
  Enabled: true
97
+ SkipBlocks: false
85
98
  EnforcedStyle: described_class
86
99
  SupportedStyles:
87
100
  - described_class
88
101
  - explicit
102
+ SafeAutoCorrect: false
103
+ VersionAdded: '1.0'
104
+ VersionChanged: '1.11'
89
105
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
90
106
 
91
107
  RSpec/DescribedClassModuleWrapping:
92
108
  Description: Avoid opening modules and defining specs within them.
93
109
  Enabled: false
110
+ VersionAdded: '1.37'
94
111
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping
95
112
 
96
113
  RSpec/Dialect:
97
114
  Description: This cop enforces custom RSpec dialects.
98
115
  Enabled: false
99
116
  PreferredMethods: {}
117
+ VersionAdded: '1.33'
100
118
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
101
119
 
102
120
  RSpec/EmptyExampleGroup:
103
121
  Description: Checks if an example group does not include any tests.
104
122
  Enabled: true
105
123
  CustomIncludeMethods: []
124
+ VersionAdded: '1.7'
106
125
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
107
126
 
127
+ RSpec/EmptyHook:
128
+ Description: Checks for empty before and after hooks.
129
+ Enabled: true
130
+ VersionAdded: '1.39'
131
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
132
+
108
133
  RSpec/EmptyLineAfterExample:
109
134
  Description: Checks if there is an empty line after example blocks.
110
135
  Enabled: true
111
136
  AllowConsecutiveOneLiners: true
137
+ VersionAdded: '1.36'
112
138
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample
113
139
 
114
140
  RSpec/EmptyLineAfterExampleGroup:
115
141
  Description: Checks if there is an empty line after example group blocks.
116
142
  Enabled: true
143
+ VersionAdded: '1.27'
117
144
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup
118
145
 
119
146
  RSpec/EmptyLineAfterFinalLet:
120
147
  Description: Checks if there is an empty line after the last let block.
121
148
  Enabled: true
149
+ VersionAdded: '1.14'
122
150
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
123
151
 
124
152
  RSpec/EmptyLineAfterHook:
125
153
  Description: Checks if there is an empty line after hook blocks.
126
154
  Enabled: true
155
+ VersionAdded: '1.27'
127
156
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook
128
157
 
129
158
  RSpec/EmptyLineAfterSubject:
130
159
  Description: Checks if there is an empty line after subject block.
131
160
  Enabled: true
161
+ VersionAdded: '1.14'
132
162
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
133
163
 
134
164
  RSpec/ExampleLength:
135
165
  Description: Checks for long examples.
136
166
  Enabled: true
137
167
  Max: 5
168
+ VersionAdded: '1.5'
138
169
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
139
170
 
140
171
  RSpec/ExampleWithoutDescription:
@@ -145,6 +176,7 @@ RSpec/ExampleWithoutDescription:
145
176
  - always_allow
146
177
  - single_line_only
147
178
  - disallow
179
+ VersionAdded: '1.22'
148
180
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
149
181
 
150
182
  RSpec/ExampleWording:
@@ -156,6 +188,8 @@ RSpec/ExampleWording:
156
188
  have: has
157
189
  HAVE: HAS
158
190
  IgnoredWords: []
191
+ VersionAdded: '1.0'
192
+ VersionChanged: '1.2'
159
193
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
160
194
 
161
195
  RSpec/ExpectActual:
@@ -163,6 +197,7 @@ RSpec/ExpectActual:
163
197
  Enabled: true
164
198
  Exclude:
165
199
  - spec/routing/**/*
200
+ VersionAdded: '1.7'
166
201
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
167
202
 
168
203
  RSpec/ExpectChange:
@@ -172,30 +207,37 @@ RSpec/ExpectChange:
172
207
  SupportedStyles:
173
208
  - method_call
174
209
  - block
210
+ VersionAdded: '1.22'
175
211
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
176
212
 
177
213
  RSpec/ExpectInHook:
178
- Enabled: true
179
214
  Description: Do not use `expect` in hooks such as `before`.
215
+ Enabled: true
216
+ VersionAdded: '1.16'
180
217
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
181
218
 
182
219
  RSpec/ExpectOutput:
183
220
  Description: Checks for opportunities to use `expect { ... }.to output`.
184
221
  Enabled: true
222
+ VersionAdded: '1.10'
185
223
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
186
224
 
187
225
  RSpec/FilePath:
188
- Description: Checks that spec file paths are consistent with the test subject.
226
+ Description: Checks that spec file paths are consistent and well-formed.
189
227
  Enabled: true
190
228
  CustomTransform:
191
229
  RuboCop: rubocop
192
230
  RSpec: rspec
193
231
  IgnoreMethods: false
232
+ SpecSuffixOnly: false
233
+ VersionAdded: '1.2'
234
+ VersionChanged: '1.40'
194
235
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
195
236
 
196
237
  RSpec/Focus:
197
238
  Description: Checks if examples are focused.
198
239
  Enabled: true
240
+ VersionAdded: '1.5'
199
241
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
200
242
 
201
243
  RSpec/HookArgument:
@@ -206,16 +248,19 @@ RSpec/HookArgument:
206
248
  - implicit
207
249
  - each
208
250
  - example
251
+ VersionAdded: '1.7'
209
252
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
210
253
 
211
254
  RSpec/HooksBeforeExamples:
212
- Enabled: true
213
255
  Description: Checks for before/around/after hooks that come after an example.
256
+ Enabled: true
257
+ VersionAdded: '1.29'
214
258
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
215
259
 
216
260
  RSpec/ImplicitBlockExpectation:
217
261
  Description: Check that implicit block expectation syntax is not used.
218
262
  Enabled: true
263
+ VersionAdded: '1.35'
219
264
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation
220
265
 
221
266
  RSpec/ImplicitExpect:
@@ -225,32 +270,39 @@ RSpec/ImplicitExpect:
225
270
  SupportedStyles:
226
271
  - is_expected
227
272
  - should
273
+ VersionAdded: '1.8'
228
274
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
229
275
 
230
276
  RSpec/ImplicitSubject:
231
- Enabled: true
232
277
  Description: Checks for usage of implicit subject (`is_expected` / `should`).
278
+ Enabled: true
233
279
  EnforcedStyle: single_line_only
234
280
  SupportedStyles:
235
281
  - single_line_only
236
282
  - single_statement_only
237
283
  - disallow
284
+ VersionAdded: '1.29'
285
+ VersionChanged: '1.30'
238
286
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
239
287
 
240
288
  RSpec/InstanceSpy:
241
289
  Description: Checks for `instance_double` used with `have_received`.
242
290
  Enabled: true
291
+ VersionAdded: '1.12'
243
292
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy
244
293
 
245
294
  RSpec/InstanceVariable:
246
295
  Description: Checks for instance variable usage in specs.
247
- AssignmentOnly: false
248
296
  Enabled: true
297
+ AssignmentOnly: false
298
+ VersionAdded: '1.0'
299
+ VersionChanged: '1.7'
249
300
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
250
301
 
251
302
  RSpec/InvalidPredicateMatcher:
252
303
  Description: Checks invalid usage for predicate matcher.
253
304
  Enabled: true
305
+ VersionAdded: '1.16'
254
306
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher
255
307
 
256
308
  RSpec/ItBehavesLike:
@@ -260,36 +312,45 @@ RSpec/ItBehavesLike:
260
312
  SupportedStyles:
261
313
  - it_behaves_like
262
314
  - it_should_behave_like
315
+ VersionAdded: '1.13'
263
316
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
264
317
 
265
318
  RSpec/IteratedExpectation:
266
319
  Description: Check that `all` matcher is used instead of iterating over an array.
267
320
  Enabled: true
321
+ VersionAdded: '1.14'
268
322
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
269
323
 
270
324
  RSpec/LeadingSubject:
271
325
  Description: Enforce that subject is the first definition in the test.
272
326
  Enabled: true
327
+ VersionAdded: '1.7'
328
+ VersionChanged: '1.14'
273
329
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject
274
330
 
275
331
  RSpec/LeakyConstantDeclaration:
276
332
  Description: Checks that no class, module, or constant is declared.
277
333
  Enabled: true
334
+ VersionAdded: '1.35'
278
335
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
279
336
 
280
337
  RSpec/LetBeforeExamples:
281
338
  Description: Checks for `let` definitions that come after an example.
282
339
  Enabled: true
340
+ VersionAdded: '1.16'
341
+ VersionChanged: '1.22'
283
342
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
284
343
 
285
344
  RSpec/LetSetup:
286
345
  Description: Checks unreferenced `let!` calls being used for test setup.
287
346
  Enabled: true
347
+ VersionAdded: '1.7'
288
348
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
289
349
 
290
350
  RSpec/MessageChain:
291
351
  Description: Check that chains of messages are not being stubbed.
292
352
  Enabled: true
353
+ VersionAdded: '1.7'
293
354
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain
294
355
 
295
356
  RSpec/MessageExpectation:
@@ -299,6 +360,8 @@ RSpec/MessageExpectation:
299
360
  SupportedStyles:
300
361
  - allow
301
362
  - expect
363
+ VersionAdded: '1.7'
364
+ VersionChanged: '1.8'
302
365
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
303
366
 
304
367
  RSpec/MessageSpies:
@@ -308,59 +371,78 @@ RSpec/MessageSpies:
308
371
  SupportedStyles:
309
372
  - have_received
310
373
  - receive
374
+ VersionAdded: '1.9'
311
375
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
312
376
 
313
377
  RSpec/MissingExampleGroupArgument:
314
378
  Description: Checks that the first argument to an example group is not empty.
315
379
  Enabled: true
380
+ VersionAdded: '1.28'
316
381
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
317
382
 
318
383
  RSpec/MultipleDescribes:
319
- Description: Checks for multiple top level describes.
384
+ Description: Checks for multiple top-level example groups.
320
385
  Enabled: true
386
+ VersionAdded: '1.0'
321
387
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes
322
388
 
323
389
  RSpec/MultipleExpectations:
324
390
  Description: Checks if examples contain too many `expect` calls.
325
391
  Enabled: true
326
392
  Max: 1
327
- AggregateFailuresByDefault: false
393
+ VersionAdded: '1.7'
394
+ VersionChanged: '1.21'
328
395
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations
329
396
 
397
+ RSpec/MultipleMemoizedHelpers:
398
+ Description: Checks if example groups contain too many `let` and `subject` calls.
399
+ Enabled: true
400
+ AllowSubject: true
401
+ Max: 5
402
+ VersionAdded: '1.43'
403
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleMemoizedHelpers
404
+
330
405
  RSpec/MultipleSubjects:
331
406
  Description: Checks if an example group defines `subject` multiple times.
332
407
  Enabled: true
408
+ VersionAdded: '1.16'
333
409
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects
334
410
 
335
411
  RSpec/NamedSubject:
336
412
  Description: Checks for explicitly referenced test subjects.
337
413
  Enabled: true
338
414
  IgnoreSharedExamples: true
415
+ VersionAdded: 1.5.3
339
416
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
340
417
 
341
418
  RSpec/NestedGroups:
342
419
  Description: Checks for nested example groups.
343
420
  Enabled: true
344
421
  Max: 3
422
+ VersionAdded: '1.7'
423
+ VersionChanged: '1.10'
345
424
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups
346
425
 
347
426
  RSpec/NotToNot:
348
427
  Description: Checks for consistent method usage for negating expectations.
428
+ Enabled: true
349
429
  EnforcedStyle: not_to
350
430
  SupportedStyles:
351
431
  - not_to
352
432
  - to_not
353
- Enabled: true
433
+ VersionAdded: '1.4'
354
434
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
355
435
 
356
436
  RSpec/OverwritingSetup:
357
- Enabled: true
358
437
  Description: Checks if there is a let/subject that overwrites an existing one.
438
+ Enabled: true
439
+ VersionAdded: '1.14'
359
440
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup
360
441
 
361
442
  RSpec/Pending:
362
- Enabled: false
363
443
  Description: Checks for any pending or skipped examples.
444
+ Enabled: false
445
+ VersionAdded: '1.25'
364
446
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
365
447
 
366
448
  RSpec/PredicateMatcher:
@@ -372,113 +454,168 @@ RSpec/PredicateMatcher:
372
454
  SupportedStyles:
373
455
  - inflected
374
456
  - explicit
457
+ SafeAutoCorrect: false
458
+ VersionAdded: '1.16'
375
459
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
376
460
 
377
461
  RSpec/ReceiveCounts:
378
- Enabled: true
379
462
  Description: Check for `once` and `twice` receive counts matchers usage.
463
+ Enabled: true
464
+ VersionAdded: '1.26'
380
465
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
381
466
 
382
467
  RSpec/ReceiveNever:
383
- Enabled: true
384
468
  Description: Prefer `not_to receive(...)` over `receive(...).never`.
469
+ Enabled: true
470
+ VersionAdded: '1.28'
385
471
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
386
472
 
387
473
  RSpec/RepeatedDescription:
388
- Enabled: true
389
474
  Description: Check for repeated description strings in example groups.
475
+ Enabled: true
476
+ VersionAdded: '1.9'
390
477
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
391
478
 
392
479
  RSpec/RepeatedExample:
393
- Enabled: true
394
480
  Description: Check for repeated examples within example groups.
481
+ Enabled: true
482
+ VersionAdded: '1.10'
395
483
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
396
484
 
397
485
  RSpec/RepeatedExampleGroupBody:
398
- Enabled: true
399
486
  Description: Check for repeated describe and context block body.
487
+ Enabled: true
488
+ VersionAdded: '1.38'
400
489
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody
401
490
 
402
491
  RSpec/RepeatedExampleGroupDescription:
403
- Enabled: true
404
492
  Description: Check for repeated example group descriptions.
493
+ Enabled: true
494
+ VersionAdded: '1.38'
405
495
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription
406
496
 
407
497
  RSpec/ReturnFromStub:
408
- Enabled: true
409
498
  Description: Checks for consistent style of stub's return setting.
499
+ Enabled: true
410
500
  EnforcedStyle: and_return
411
501
  SupportedStyles:
412
502
  - and_return
413
503
  - block
504
+ VersionAdded: '1.16'
505
+ VersionChanged: '1.22'
414
506
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
415
507
 
416
508
  RSpec/ScatteredLet:
417
509
  Description: Checks for let scattered across the example group.
418
510
  Enabled: true
511
+ VersionAdded: '1.14'
512
+ VersionChanged: '1.39'
419
513
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
420
514
 
421
515
  RSpec/ScatteredSetup:
422
516
  Description: Checks for setup scattered across multiple hooks in an example group.
423
517
  Enabled: true
518
+ VersionAdded: '1.10'
424
519
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
425
520
 
426
521
  RSpec/SharedContext:
427
522
  Description: Checks for proper shared_context and shared_examples usage.
428
523
  Enabled: true
524
+ VersionAdded: '1.13'
429
525
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
430
526
 
431
527
  RSpec/SharedExamples:
432
528
  Description: Enforces use of string to titleize shared examples.
433
529
  Enabled: true
530
+ VersionAdded: '1.25'
434
531
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
435
532
 
436
533
  RSpec/SingleArgumentMessageChain:
437
534
  Description: Checks that chains of messages contain more than one element.
438
535
  Enabled: true
536
+ VersionAdded: '1.9'
537
+ VersionChanged: '1.10'
439
538
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
440
539
 
441
540
  RSpec/SubjectStub:
442
541
  Description: Checks for stubbed test subjects.
443
542
  Enabled: true
543
+ VersionAdded: '1.7'
444
544
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
445
545
 
446
546
  RSpec/UnspecifiedException:
447
547
  Description: Checks for a specified error in checking raised errors.
448
548
  Enabled: true
549
+ VersionAdded: '1.30'
449
550
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException
450
551
 
552
+ RSpec/VariableDefinition:
553
+ Description: Checks that memoized helpers names are symbols or strings.
554
+ Enabled: true
555
+ EnforcedStyle: symbols
556
+ SupportedStyles:
557
+ - symbols
558
+ - strings
559
+ VersionAdded: '1.40'
560
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
561
+
562
+ RSpec/VariableName:
563
+ Description: Checks that memoized helper names use the configured style.
564
+ Enabled: true
565
+ EnforcedStyle: snake_case
566
+ SupportedStyles:
567
+ - snake_case
568
+ - camelCase
569
+ IgnoredPatterns: []
570
+ VersionAdded: '1.40'
571
+ VersionChanged: '1.43'
572
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName
573
+
451
574
  RSpec/VerifiedDoubles:
452
575
  Description: Prefer using verifying doubles over normal doubles.
453
576
  Enabled: true
454
577
  IgnoreNameless: true
455
578
  IgnoreSymbolicNames: false
579
+ VersionAdded: 1.2.1
580
+ VersionChanged: '1.5'
456
581
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
457
582
 
458
583
  RSpec/VoidExpect:
459
584
  Description: This cop checks void `expect()`.
460
585
  Enabled: true
586
+ VersionAdded: '1.16'
461
587
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect
462
588
 
463
589
  RSpec/Yield:
464
590
  Description: This cop checks for calling a block within a stub.
465
591
  Enabled: true
592
+ VersionAdded: '1.32'
466
593
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
467
594
 
468
595
  Capybara/CurrentPathExpectation:
469
596
  Description: Checks that no expectations are set on Capybara's `current_path`.
470
597
  Enabled: true
598
+ VersionAdded: '1.18'
471
599
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
472
600
 
473
601
  Capybara/FeatureMethods:
474
602
  Description: Checks for consistent method usage in feature specs.
475
603
  Enabled: true
476
604
  EnabledMethods: []
605
+ VersionAdded: '1.17'
606
+ VersionChanged: '1.25'
477
607
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
478
608
 
609
+ Capybara/VisibilityMatcher:
610
+ Description: Checks for boolean visibility in capybara finders.
611
+ Enabled: true
612
+ VersionAdded: '1.39'
613
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
614
+
479
615
  FactoryBot/AttributeDefinedStatically:
480
616
  Description: Always declare attribute values as blocks.
481
617
  Enabled: true
618
+ VersionAdded: '1.28'
482
619
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
483
620
 
484
621
  FactoryBot/CreateList:
@@ -488,11 +625,13 @@ FactoryBot/CreateList:
488
625
  SupportedStyles:
489
626
  - create_list
490
627
  - n_times
628
+ VersionAdded: '1.25'
491
629
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
492
630
 
493
631
  FactoryBot/FactoryClassName:
494
632
  Description: Use string value when setting the class attribute explicitly.
495
633
  Enabled: true
634
+ VersionAdded: '1.37'
496
635
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
497
636
 
498
637
  Rails/HttpStatus:
@@ -502,4 +641,5 @@ Rails/HttpStatus:
502
641
  SupportedStyles:
503
642
  - numeric
504
643
  - symbolic
644
+ VersionAdded: '1.23'
505
645
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus