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