rubocop-rspec 2.0.0 → 2.4.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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +3 -3
  4. data/config/default.yml +141 -125
  5. data/lib/rubocop-rspec.rb +1 -0
  6. data/lib/rubocop/cop/rspec/any_instance.rb +6 -10
  7. data/lib/rubocop/cop/rspec/around_block.rb +3 -1
  8. data/lib/rubocop/cop/rspec/be.rb +2 -1
  9. data/lib/rubocop/cop/rspec/be_eql.rb +2 -0
  10. data/lib/rubocop/cop/rspec/before_after_all.rb +6 -3
  11. data/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +5 -0
  12. data/lib/rubocop/cop/rspec/capybara/feature_methods.rb +3 -0
  13. data/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +4 -0
  14. data/lib/rubocop/cop/rspec/context_method.rb +1 -0
  15. data/lib/rubocop/cop/rspec/context_wording.rb +7 -1
  16. data/lib/rubocop/cop/rspec/describe_class.rb +4 -1
  17. data/lib/rubocop/cop/rspec/describe_method.rb +2 -1
  18. data/lib/rubocop/cop/rspec/describe_symbol.rb +2 -0
  19. data/lib/rubocop/cop/rspec/described_class.rb +6 -1
  20. data/lib/rubocop/cop/rspec/described_class_module_wrapping.rb +2 -1
  21. data/lib/rubocop/cop/rspec/dialect.rb +1 -0
  22. data/lib/rubocop/cop/rspec/empty_hook.rb +1 -0
  23. data/lib/rubocop/cop/rspec/example_length.rb +26 -12
  24. data/lib/rubocop/cop/rspec/example_without_description.rb +1 -0
  25. data/lib/rubocop/cop/rspec/example_wording.rb +1 -0
  26. data/lib/rubocop/cop/rspec/expect_actual.rb +2 -0
  27. data/lib/rubocop/cop/rspec/expect_change.rb +6 -3
  28. data/lib/rubocop/cop/rspec/expect_in_hook.rb +1 -0
  29. data/lib/rubocop/cop/rspec/expect_output.rb +1 -1
  30. data/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +3 -0
  31. data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +4 -0
  32. data/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb +2 -0
  33. data/lib/rubocop/cop/rspec/file_path.rb +31 -20
  34. data/lib/rubocop/cop/rspec/focus.rb +33 -1
  35. data/lib/rubocop/cop/rspec/hook_argument.rb +2 -0
  36. data/lib/rubocop/cop/rspec/hooks_before_examples.rb +1 -0
  37. data/lib/rubocop/cop/rspec/identical_equality_assertion.rb +38 -0
  38. data/lib/rubocop/cop/rspec/implicit_block_expectation.rb +4 -0
  39. data/lib/rubocop/cop/rspec/implicit_expect.rb +1 -0
  40. data/lib/rubocop/cop/rspec/implicit_subject.rb +19 -1
  41. data/lib/rubocop/cop/rspec/instance_spy.rb +3 -1
  42. data/lib/rubocop/cop/rspec/instance_variable.rb +4 -0
  43. data/lib/rubocop/cop/rspec/it_behaves_like.rb +3 -1
  44. data/lib/rubocop/cop/rspec/iterated_expectation.rb +3 -1
  45. data/lib/rubocop/cop/rspec/let_before_examples.rb +1 -0
  46. data/lib/rubocop/cop/rspec/let_setup.rb +3 -0
  47. data/lib/rubocop/cop/rspec/message_chain.rb +4 -10
  48. data/lib/rubocop/cop/rspec/message_expectation.rb +3 -0
  49. data/lib/rubocop/cop/rspec/message_spies.rb +4 -2
  50. data/lib/rubocop/cop/rspec/mixin/comments_help.rb +38 -0
  51. data/lib/rubocop/cop/rspec/mixin/variable.rb +1 -0
  52. data/lib/rubocop/cop/rspec/multiple_describes.rb +1 -2
  53. data/lib/rubocop/cop/rspec/multiple_expectations.rb +3 -0
  54. data/lib/rubocop/cop/rspec/named_subject.rb +3 -0
  55. data/lib/rubocop/cop/rspec/not_to_not.rb +2 -0
  56. data/lib/rubocop/cop/rspec/overwriting_setup.rb +2 -0
  57. data/lib/rubocop/cop/rspec/pending.rb +4 -0
  58. data/lib/rubocop/cop/rspec/predicate_matcher.rb +5 -0
  59. data/lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb +44 -0
  60. data/lib/rubocop/cop/rspec/rails/http_status.rb +2 -0
  61. data/lib/rubocop/cop/rspec/receive_counts.rb +4 -0
  62. data/lib/rubocop/cop/rspec/receive_never.rb +2 -0
  63. data/lib/rubocop/cop/rspec/repeated_example_group_body.rb +8 -1
  64. data/lib/rubocop/cop/rspec/repeated_example_group_description.rb +4 -0
  65. data/lib/rubocop/cop/rspec/repeated_include_example.rb +3 -0
  66. data/lib/rubocop/cop/rspec/return_from_stub.rb +6 -0
  67. data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
  68. data/lib/rubocop/cop/rspec/shared_context.rb +6 -5
  69. data/lib/rubocop/cop/rspec/shared_examples.rb +1 -0
  70. data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +4 -1
  71. data/lib/rubocop/cop/rspec/stubbed_mock.rb +1 -0
  72. data/lib/rubocop/cop/rspec/subject_stub.rb +15 -4
  73. data/lib/rubocop/cop/rspec/unspecified_exception.rb +2 -0
  74. data/lib/rubocop/cop/rspec/verified_doubles.rb +2 -0
  75. data/lib/rubocop/cop/rspec/void_expect.rb +3 -0
  76. data/lib/rubocop/cop/rspec/yield.rb +3 -0
  77. data/lib/rubocop/cop/rspec_cops.rb +2 -0
  78. data/lib/rubocop/rspec/config_formatter.rb +3 -1
  79. data/lib/rubocop/rspec/corrector/move_node.rb +6 -9
  80. data/lib/rubocop/rspec/example.rb +5 -0
  81. data/lib/rubocop/rspec/hook.rb +1 -0
  82. data/lib/rubocop/rspec/language.rb +10 -0
  83. data/lib/rubocop/rspec/node.rb +1 -1
  84. data/lib/rubocop/rspec/version.rb +1 -1
  85. metadata +9 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53f24b40715eb1f00efa9978b77383037e8c9d61d13c23b068928b05043430ca
4
- data.tar.gz: 2d295003c7eefe76dfc7ca0f29711313b8b18b9c8579ce4464a47b47f412b54e
3
+ metadata.gz: 35d3cf723ee0c50db00cbc5e63f5d9bf142186843fd56a86248dfb284c65180c
4
+ data.tar.gz: 8d0c0e01c405332eac2075b60d518a71e82a7d54f4b41ef111f5ef2b869e1f88
5
5
  SHA512:
6
- metadata.gz: 15221270a01b2a273708d0e0fd3c35b52a9e40f87f672b2c4b7b547c55df0415394c7d762e4255406553ab26e0432d9a610d38a36d9fa92dddec47209428c856
7
- data.tar.gz: 7bbcba195d894aa24d2985444421042314dd018f931763164502ee511c857d3010c074e8206f0af777e99b13ac668d1a32e03a8aefaa8dc38b3714c95ceb9555
6
+ metadata.gz: 2e28be09b6cc11154b903ef574ef44487c44ade441f79b1172569d66cecd2c027d525dbcefbe755d7a0f2c872491a018fb24cd026453dc13ac764bcae7312abc
7
+ data.tar.gz: 3062cea8205acc5e020c404034c8c2590c6c5c089649c62280887b0bc20ca3b4b38048a983b2947f9ed10bc1824992955c6a58736db53f071c72a3fdde9363f8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 2.4.0 (2021-06-09)
6
+
7
+ * Update `RSpec/FilePath` to check suffix when given a non-constant top-level node (e.g. features). ([@topalovic][])
8
+ * Add missing documentation for `single_statement_only` style of `RSpec/ImplicitSubject` cop. ([@tejasbubane][])
9
+ * Fix an exception in `DescribedClass` when accessing a constant on a variable in a spec that is nested in a namespace. ([@rrosenblum][])
10
+ * Add new `RSpec/IdenticalEqualityAssertion` cop. ([@tejasbubane][])
11
+ * Add `RSpec/Rails/AvoidSetupHook` cop. ([@paydaylight][])
12
+ * Fix false negative in `RSpec/ExpectChange` cop with block style and chained method call. ([@tejasbubane][])
13
+
14
+ ## 2.3.0 (2021-04-28)
15
+
16
+ * Allow `RSpec/ContextWording` to accept multi-word prefixes. ([@hosamaly][])
17
+ * Drop support for ruby 2.4. ([@bquorning][])
18
+ * Add `CountAsOne` configuration option to `RSpec/ExampleLength`. ([@stephannv][])
19
+ * Fix a false positive for `RSpec/RepeatedExampleGroupBody` when `pending` or `skip` have argument(s). ([@Tietew][])
20
+
21
+ ## 2.2.0 (2021-02-02)
22
+
23
+ * Fix `HooksBeforeExamples`, `LeadingSubject`, `LetBeforeExamples` and `ScatteredLet` autocorrection to take into account inline comments and comments immediately before the moved node. ([@Darhazer][])
24
+ * Improve rubocop-rspec performance. ([@Darhazer][], [@bquorning][])
25
+ * Include `Enabled: true` to prevent a mismatched configuration parameter warning when `RSpec` cops are explicitly enabled in the user configuration. ([@pirj][])
26
+
27
+ ## 2.1.0 (2020-12-17)
28
+
29
+ * Fix `RSpec/FilePath` false positive for relative file path runs with long namespaces. ([@ahukkanen][])
30
+ * Update `RSpec/Focus` to have auto-correction. ([@dvandersluis][])
31
+
32
+ ## 2.0.1 (2020-12-02)
33
+
34
+ * Fixed infinite loop in `RSpec/ExpectActual` autocorrection when both expected and actual values are literals. ([@Darhazer][])
35
+
5
36
  ## 2.0.0 (2020-11-06)
6
37
 
7
38
  * Remove deprecated class `::RuboCop::Cop::RSpec::Cop`. ([@bquorning][])
@@ -586,3 +617,11 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
586
617
  [@Rafix02]: https://github.com/Rafix02
587
618
  [@PhilCoggins]: https://github.com/PhilCoggins
588
619
  [@sl4vr]: https://github.com/sl4vr
620
+ [@ahukkanen]: https://github.com/ahukkanen
621
+ [@dvandersluis]: https://github.com/dvandersluis
622
+ [@hosamaly]: https://github.com/hosamaly
623
+ [@stephannv]: https://github.com/stephannv
624
+ [@Tietew]: https://github.com/Tietew
625
+ [@rrosenblum]: https://github.com/rrosenblum
626
+ [@paydaylight]: https://github.com/paydaylight
627
+ [@topalovic]: https://github.com/topalovic
data/README.md CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  [![Join the chat at https://gitter.im/rubocop-rspec/Lobby](https://badges.gitter.im/rubocop-rspec/Lobby.svg)](https://gitter.im/rubocop-rspec/Lobby)
4
4
  [![Gem Version](https://badge.fury.io/rb/rubocop-rspec.svg)](https://rubygems.org/gems/rubocop-rspec)
5
- [![CircleCI](https://circleci.com/gh/rubocop-hq/rubocop-rspec.svg?style=svg)](https://circleci.com/gh/rubocop-hq/rubocop-rspec)
5
+ [![CircleCI](https://circleci.com/gh/rubocop/rubocop-rspec.svg?style=svg)](https://circleci.com/gh/rubocop/rubocop-rspec)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/8ffaabf633c968c22bdd/test_coverage)](https://codeclimate.com/github/rubocop-hq/rubocop-rspec/test_coverage)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/8ffaabf633c968c22bdd/maintainability)](https://codeclimate.com/github/rubocop-hq/rubocop-rspec/maintainability)
8
8
 
9
9
  RSpec-specific analysis for your projects, as an extension to
10
- [RuboCop](https://github.com/rubocop-hq/rubocop).
10
+ [RuboCop](https://github.com/rubocop/rubocop).
11
11
 
12
12
  ## Installation
13
13
 
@@ -71,7 +71,7 @@ rubocop-rspec is available on Code Climate as part of the rubocop engine. [Learn
71
71
 
72
72
  ## Documentation
73
73
 
74
- 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).
75
75
 
76
76
  ## The Cops
77
77
 
data/config/default.yml CHANGED
@@ -1,85 +1,86 @@
1
1
  ---
2
2
  RSpec:
3
+ Enabled: true
3
4
  Include:
4
- - "**/*_spec.rb"
5
- - "**/spec/**/*"
5
+ - "**/*_spec.rb"
6
+ - "**/spec/**/*"
6
7
  Language:
7
8
  ExampleGroups:
8
9
  Regular:
9
- - describe
10
- - context
11
- - feature
12
- - example_group
10
+ - describe
11
+ - context
12
+ - feature
13
+ - example_group
13
14
  Skipped:
14
- - xdescribe
15
- - xcontext
16
- - xfeature
15
+ - xdescribe
16
+ - xcontext
17
+ - xfeature
17
18
  Focused:
18
- - fdescribe
19
- - fcontext
20
- - ffeature
19
+ - fdescribe
20
+ - fcontext
21
+ - ffeature
21
22
  Examples:
22
23
  Regular:
23
- - it
24
- - specify
25
- - example
26
- - scenario
27
- - its
24
+ - it
25
+ - specify
26
+ - example
27
+ - scenario
28
+ - its
28
29
  Focused:
29
- - fit
30
- - fspecify
31
- - fexample
32
- - fscenario
33
- - focus
30
+ - fit
31
+ - fspecify
32
+ - fexample
33
+ - fscenario
34
+ - focus
34
35
  Skipped:
35
- - xit
36
- - xspecify
37
- - xexample
38
- - xscenario
39
- - skip
36
+ - xit
37
+ - xspecify
38
+ - xexample
39
+ - xscenario
40
+ - skip
40
41
  Pending:
41
- - pending
42
+ - pending
42
43
  Expectations:
43
- - expect
44
- - is_expected
45
- - expect_any_instance_of
44
+ - expect
45
+ - is_expected
46
+ - expect_any_instance_of
46
47
  Helpers:
47
- - let
48
- - let!
48
+ - let
49
+ - let!
49
50
  Hooks:
50
- - prepend_before
51
- - before
52
- - append_before
53
- - around
54
- - prepend_after
55
- - after
56
- - append_after
51
+ - prepend_before
52
+ - before
53
+ - append_before
54
+ - around
55
+ - prepend_after
56
+ - after
57
+ - append_after
57
58
  HookScopes:
58
- - each
59
- - example
60
- - context
61
- - all
62
- - suite
59
+ - each
60
+ - example
61
+ - context
62
+ - all
63
+ - suite
63
64
  Includes:
64
65
  Examples:
65
- - it_behaves_like
66
- - it_should_behave_like
67
- - include_examples
66
+ - it_behaves_like
67
+ - it_should_behave_like
68
+ - include_examples
68
69
  Context:
69
- - include_context
70
+ - include_context
70
71
  Runners:
71
- - to
72
- - to_not
73
- - not_to
72
+ - to
73
+ - to_not
74
+ - not_to
74
75
  SharedGroups:
75
76
  Examples:
76
- - shared_examples
77
- - shared_examples_for
77
+ - shared_examples
78
+ - shared_examples_for
78
79
  Context:
79
- - shared_context
80
+ - shared_context
80
81
  Subjects:
81
- - subject
82
- - subject!
82
+ - subject
83
+ - subject!
83
84
 
84
85
  RSpec/AlignLeftLetBrace:
85
86
  Description: Checks that left braces for adjacent single line lets are aligned.
@@ -121,9 +122,9 @@ RSpec/BeforeAfterAll:
121
122
  Description: Check that before/after(:all) isn't being used.
122
123
  Enabled: true
123
124
  Exclude:
124
- - spec/spec_helper.rb
125
- - spec/rails_helper.rb
126
- - spec/support/**/*.rb
125
+ - spec/spec_helper.rb
126
+ - spec/rails_helper.rb
127
+ - spec/support/**/*.rb
127
128
  VersionAdded: '1.12'
128
129
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
129
130
 
@@ -137,9 +138,9 @@ RSpec/ContextWording:
137
138
  Description: Checks that `context` docstring starts with an allowed prefix.
138
139
  Enabled: true
139
140
  Prefixes:
140
- - when
141
- - with
142
- - without
141
+ - when
142
+ - with
143
+ - without
143
144
  VersionAdded: '1.20'
144
145
  VersionChanged: 1.20.1
145
146
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
@@ -149,19 +150,19 @@ RSpec/DescribeClass:
149
150
  Enabled: true
150
151
  IgnoredMetadata:
151
152
  type:
152
- - channel
153
- - controller
154
- - helper
155
- - job
156
- - mailer
157
- - model
158
- - request
159
- - routing
160
- - view
161
- - feature
162
- - system
163
- - mailbox
164
- - 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
165
166
  VersionAdded: '1.0'
166
167
  VersionChanged: '1.44'
167
168
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
@@ -184,8 +185,8 @@ RSpec/DescribedClass:
184
185
  SkipBlocks: false
185
186
  EnforcedStyle: described_class
186
187
  SupportedStyles:
187
- - described_class
188
- - explicit
188
+ - described_class
189
+ - explicit
189
190
  SafeAutoCorrect: false
190
191
  VersionAdded: '1.0'
191
192
  VersionChanged: '1.11'
@@ -252,7 +253,9 @@ RSpec/ExampleLength:
252
253
  Description: Checks for long examples.
253
254
  Enabled: true
254
255
  Max: 5
256
+ CountAsOne: []
255
257
  VersionAdded: '1.5'
258
+ VersionChanged: '2.3'
256
259
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
257
260
 
258
261
  RSpec/ExampleWithoutDescription:
@@ -260,9 +263,9 @@ RSpec/ExampleWithoutDescription:
260
263
  Enabled: true
261
264
  EnforcedStyle: always_allow
262
265
  SupportedStyles:
263
- - always_allow
264
- - single_line_only
265
- - disallow
266
+ - always_allow
267
+ - single_line_only
268
+ - disallow
266
269
  VersionAdded: '1.22'
267
270
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
268
271
 
@@ -283,7 +286,7 @@ RSpec/ExpectActual:
283
286
  Description: Checks for `expect(...)` calls containing literal values.
284
287
  Enabled: true
285
288
  Exclude:
286
- - spec/routing/**/*
289
+ - spec/routing/**/*
287
290
  VersionAdded: '1.7'
288
291
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
289
292
 
@@ -292,8 +295,8 @@ RSpec/ExpectChange:
292
295
  Enabled: true
293
296
  EnforcedStyle: method_call
294
297
  SupportedStyles:
295
- - method_call
296
- - block
298
+ - method_call
299
+ - block
297
300
  VersionAdded: '1.22'
298
301
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
299
302
 
@@ -313,8 +316,8 @@ RSpec/FilePath:
313
316
  Description: Checks that spec file paths are consistent and well-formed.
314
317
  Enabled: true
315
318
  Include:
316
- - "**/*_spec*rb*"
317
- - "**/spec/**/*"
319
+ - "**/*_spec*rb*"
320
+ - "**/spec/**/*"
318
321
  CustomTransform:
319
322
  RuboCop: rubocop
320
323
  RSpec: rspec
@@ -328,6 +331,7 @@ RSpec/Focus:
328
331
  Description: Checks if examples are focused.
329
332
  Enabled: true
330
333
  VersionAdded: '1.5'
334
+ VersionChanged: '2.1'
331
335
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
332
336
 
333
337
  RSpec/HookArgument:
@@ -335,9 +339,9 @@ RSpec/HookArgument:
335
339
  Enabled: true
336
340
  EnforcedStyle: implicit
337
341
  SupportedStyles:
338
- - implicit
339
- - each
340
- - example
342
+ - implicit
343
+ - each
344
+ - example
341
345
  VersionAdded: '1.7'
342
346
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
343
347
 
@@ -347,6 +351,12 @@ RSpec/HooksBeforeExamples:
347
351
  VersionAdded: '1.29'
348
352
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
349
353
 
354
+ RSpec/IdenticalEqualityAssertion:
355
+ Description: Checks for equality assertions with identical expressions on both sides.
356
+ Enabled: pending
357
+ VersionAdded: '2.4'
358
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion
359
+
350
360
  RSpec/ImplicitBlockExpectation:
351
361
  Description: Check that implicit block expectation syntax is not used.
352
362
  Enabled: true
@@ -358,8 +368,8 @@ RSpec/ImplicitExpect:
358
368
  Enabled: true
359
369
  EnforcedStyle: is_expected
360
370
  SupportedStyles:
361
- - is_expected
362
- - should
371
+ - is_expected
372
+ - should
363
373
  VersionAdded: '1.8'
364
374
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
365
375
 
@@ -368,9 +378,9 @@ RSpec/ImplicitSubject:
368
378
  Enabled: true
369
379
  EnforcedStyle: single_line_only
370
380
  SupportedStyles:
371
- - single_line_only
372
- - single_statement_only
373
- - disallow
381
+ - single_line_only
382
+ - single_statement_only
383
+ - disallow
374
384
  VersionAdded: '1.29'
375
385
  VersionChanged: '1.30'
376
386
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
@@ -394,8 +404,8 @@ RSpec/ItBehavesLike:
394
404
  Enabled: true
395
405
  EnforcedStyle: it_behaves_like
396
406
  SupportedStyles:
397
- - it_behaves_like
398
- - it_should_behave_like
407
+ - it_behaves_like
408
+ - it_should_behave_like
399
409
  VersionAdded: '1.13'
400
410
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
401
411
 
@@ -442,8 +452,8 @@ RSpec/MessageExpectation:
442
452
  Enabled: false
443
453
  EnforcedStyle: allow
444
454
  SupportedStyles:
445
- - allow
446
- - expect
455
+ - allow
456
+ - expect
447
457
  VersionAdded: '1.7'
448
458
  VersionChanged: '1.8'
449
459
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
@@ -453,8 +463,8 @@ RSpec/MessageSpies:
453
463
  Enabled: true
454
464
  EnforcedStyle: have_received
455
465
  SupportedStyles:
456
- - have_received
457
- - receive
466
+ - have_received
467
+ - receive
458
468
  VersionAdded: '1.9'
459
469
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
460
470
 
@@ -512,8 +522,8 @@ RSpec/NotToNot:
512
522
  Enabled: true
513
523
  EnforcedStyle: not_to
514
524
  SupportedStyles:
515
- - not_to
516
- - to_not
525
+ - not_to
526
+ - to_not
517
527
  VersionAdded: '1.4'
518
528
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
519
529
 
@@ -536,8 +546,8 @@ RSpec/PredicateMatcher:
536
546
  EnforcedStyle: inflected
537
547
  AllowedExplicitMatchers: []
538
548
  SupportedStyles:
539
- - inflected
540
- - explicit
549
+ - inflected
550
+ - explicit
541
551
  SafeAutoCorrect: false
542
552
  VersionAdded: '1.16'
543
553
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
@@ -589,8 +599,8 @@ RSpec/ReturnFromStub:
589
599
  Enabled: true
590
600
  EnforcedStyle: and_return
591
601
  SupportedStyles:
592
- - and_return
593
- - block
602
+ - and_return
603
+ - block
594
604
  VersionAdded: '1.16'
595
605
  VersionChanged: '1.22'
596
606
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
@@ -650,8 +660,8 @@ RSpec/VariableDefinition:
650
660
  Enabled: true
651
661
  EnforcedStyle: symbols
652
662
  SupportedStyles:
653
- - symbols
654
- - strings
663
+ - symbols
664
+ - strings
655
665
  VersionAdded: '1.40'
656
666
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
657
667
 
@@ -660,8 +670,8 @@ RSpec/VariableName:
660
670
  Enabled: true
661
671
  EnforcedStyle: snake_case
662
672
  SupportedStyles:
663
- - snake_case
664
- - camelCase
673
+ - snake_case
674
+ - camelCase
665
675
  IgnoredPatterns: []
666
676
  VersionAdded: '1.40'
667
677
  VersionChanged: '1.43'
@@ -714,9 +724,9 @@ RSpec/FactoryBot/AttributeDefinedStatically:
714
724
  Description: Always declare attribute values as blocks.
715
725
  Enabled: true
716
726
  Include:
717
- - spec/factories.rb
718
- - spec/factories/**/*.rb
719
- - features/support/factories/**/*.rb
727
+ - spec/factories.rb
728
+ - spec/factories/**/*.rb
729
+ - features/support/factories/**/*.rb
720
730
  VersionAdded: '1.28'
721
731
  VersionChanged: '2.0'
722
732
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
@@ -725,15 +735,15 @@ RSpec/FactoryBot/CreateList:
725
735
  Description: Checks for create_list usage.
726
736
  Enabled: true
727
737
  Include:
728
- - "**/*_spec.rb"
729
- - "**/spec/**/*"
730
- - spec/factories.rb
731
- - spec/factories/**/*.rb
732
- - features/support/factories/**/*.rb
738
+ - "**/*_spec.rb"
739
+ - "**/spec/**/*"
740
+ - spec/factories.rb
741
+ - spec/factories/**/*.rb
742
+ - features/support/factories/**/*.rb
733
743
  EnforcedStyle: create_list
734
744
  SupportedStyles:
735
- - create_list
736
- - n_times
745
+ - create_list
746
+ - n_times
737
747
  VersionAdded: '1.25'
738
748
  VersionChanged: '2.0'
739
749
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
@@ -742,20 +752,26 @@ RSpec/FactoryBot/FactoryClassName:
742
752
  Description: Use string value when setting the class attribute explicitly.
743
753
  Enabled: true
744
754
  Include:
745
- - spec/factories.rb
746
- - spec/factories/**/*.rb
747
- - features/support/factories/**/*.rb
755
+ - spec/factories.rb
756
+ - spec/factories/**/*.rb
757
+ - features/support/factories/**/*.rb
748
758
  VersionAdded: '1.37'
749
759
  VersionChanged: '2.0'
750
760
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
751
761
 
762
+ RSpec/Rails/AvoidSetupHook:
763
+ Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
764
+ Enabled: pending
765
+ VersionAdded: '2.4'
766
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook
767
+
752
768
  RSpec/Rails/HttpStatus:
753
769
  Description: Enforces use of symbolic or numeric value to describe HTTP status.
754
770
  Enabled: true
755
771
  EnforcedStyle: symbolic
756
772
  SupportedStyles:
757
- - numeric
758
- - symbolic
773
+ - numeric
774
+ - symbolic
759
775
  VersionAdded: '1.23'
760
776
  VersionChanged: '2.0'
761
777
  StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus