Skip to content

Commit c414297

Browse files
authored
Merge pull request #1904 from rubocop/prerelease
Release v3.0.0.pre
2 parents eaf53f4 + 130655b commit c414297

File tree

6 files changed

+30
-88
lines changed

6 files changed

+30
-88
lines changed

.rubocop.yml

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ Style/RequireOrder:
122122
Enabled: true
123123

124124
RSpec/SpecFilePathFormat:
125-
Enabled: true
126125
Exclude:
127126
- spec/rubocop/cop/rspec/mixin/**/*.rb
128127

@@ -253,66 +252,5 @@ Style/SwapValues: {Enabled: true}
253252
Style/YAMLFileRead: {Enabled: true}
254253

255254
# Enable our own pending cops.
256-
257-
RSpec/BeEmpty:
258-
Enabled: true
259-
RSpec/BeEq:
260-
Enabled: true
261-
RSpec/BeNil:
262-
Enabled: true
263-
RSpec/ChangeByZero:
264-
Enabled: true
265-
RSpec/ClassCheck:
266-
Enabled: true
267-
RSpec/ContainExactly:
268-
Enabled: true
269-
RSpec/DuplicatedMetadata:
270-
Enabled: true
271-
RSpec/EmptyMetadata:
272-
Enabled: true
273-
RSpec/EmptyOutput:
274-
Enabled: true
275-
RSpec/Eq:
276-
Enabled: true
277-
RSpec/ExcessiveDocstringSpacing:
278-
Enabled: true
279-
RSpec/ExpectInLet:
280-
Enabled: true
281-
RSpec/IdenticalEqualityAssertion:
282-
Enabled: true
283-
RSpec/IndexedLet:
284-
Enabled: true
285-
RSpec/IsExpectedSpecify:
286-
Enabled: true
287-
RSpec/MatchArray:
288-
Enabled: true
289-
RSpec/MetadataStyle:
290-
Enabled: true
291-
RSpec/MissingExpectationTargetMethod:
292-
Enabled: true
293-
RSpec/NoExpectationExample:
294-
Enabled: true
295-
RSpec/PendingWithoutReason:
296-
Enabled: true
297-
RSpec/ReceiveMessages:
298-
Enabled: true
299-
RSpec/RedundantAround:
300-
Enabled: true
301-
RSpec/RedundantPredicateMatcher:
302-
Enabled: true
303-
RSpec/RemoveConst:
304-
Enabled: true
305-
RSpec/RepeatedSubjectCall:
306-
Enabled: true
307-
RSpec/SkipBlockInsideExample:
308-
Enabled: true
309-
RSpec/SortMetadata:
310-
Enabled: true
311-
RSpec/SpecFilePathSuffix:
312-
Enabled: true
313-
RSpec/SubjectDeclaration:
314-
Enabled: true
315-
RSpec/UndescriptiveLiteralsDescription:
316-
Enabled: true
317-
RSpec/VerifiedDoubleReference:
318-
Enabled: true
255+
#
256+
# No pending cops yet.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Master (Unreleased)
44

5+
## 3.0.0.pre (2024-06-05)
6+
57
- Remove extracted cops in `Capybara`, `FactoryBot` and `Rails` departments. ([@ydah])
68
- Remove `RuboCop::RSpec::Language::NodePattern`. ([@ydah])
79
- Remove `RSpec/FilePath` cop. ([@ydah])
@@ -10,6 +12,8 @@
1012
- Add new `RSpec/MissingExpectationTargetMethod` cop. ([@krororo])
1113
- Fix an error for `RSpec/ScatteredSetup` when one of the hooks is an empty block. ([@earlopain])
1214

15+
Read more about how to upgrade in https://docs.rubocop.org/rubocop-rspec/upgrade_to_version_3.html
16+
1317
## 2.31.0 (2024-06-07)
1418

1519
- Support `AutoCorrect: contextual` option for LSP. ([@ydah])

config/default.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ RSpec/BeEmpty:
149149
Enabled: true
150150
AutoCorrect: contextual
151151
VersionAdded: '2.20'
152-
VersionChanged: "<<next>>"
152+
VersionChanged: '2.31'
153153
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty
154154

155155
RSpec/BeEq:
@@ -316,15 +316,15 @@ RSpec/EmptyExampleGroup:
316316
AutoCorrect: contextual
317317
SafeAutoCorrect: false
318318
VersionAdded: '1.7'
319-
VersionChanged: "<<next>>"
319+
VersionChanged: '2.31'
320320
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
321321

322322
RSpec/EmptyHook:
323323
Description: Checks for empty before and after hooks.
324324
Enabled: true
325325
AutoCorrect: contextual
326326
VersionAdded: '1.39'
327-
VersionChanged: "<<next>>"
327+
VersionChanged: '2.31'
328328
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
329329

330330
RSpec/EmptyLineAfterExample:
@@ -370,7 +370,7 @@ RSpec/EmptyMetadata:
370370
Enabled: true
371371
AutoCorrect: contextual
372372
VersionAdded: '2.24'
373-
VersionChanged: "<<next>>"
373+
VersionChanged: '2.31'
374374
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata
375375

376376
RSpec/EmptyOutput:
@@ -471,7 +471,7 @@ RSpec/Focus:
471471
Enabled: true
472472
AutoCorrect: contextual
473473
VersionAdded: '1.5'
474-
VersionChanged: "<<next>>"
474+
VersionChanged: '2.31'
475475
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
476476

477477
RSpec/HookArgument:
@@ -491,7 +491,7 @@ RSpec/HooksBeforeExamples:
491491
Enabled: true
492492
AutoCorrect: contextual
493493
VersionAdded: '1.29'
494-
VersionChanged: "<<next>>"
494+
VersionChanged: '2.31'
495495
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
496496

497497
RSpec/IdenticalEqualityAssertion:
@@ -599,7 +599,7 @@ RSpec/LetBeforeExamples:
599599
Enabled: true
600600
AutoCorrect: contextual
601601
VersionAdded: '1.16'
602-
VersionChanged: "<<next>>"
602+
VersionChanged: '2.31'
603603
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
604604

605605
RSpec/LetSetup:
@@ -659,8 +659,8 @@ RSpec/MissingExampleGroupArgument:
659659

660660
RSpec/MissingExpectationTargetMethod:
661661
Description: Checks if `.to`, `not_to` or `to_not` are used.
662-
Enabled: pending
663-
VersionAdded: "<<next>>"
662+
Enabled: true
663+
VersionAdded: '3.0'
664664
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExpectationTargetMethod
665665

666666
RSpec/MultipleDescribes:
@@ -857,15 +857,15 @@ RSpec/ScatteredLet:
857857
Enabled: true
858858
AutoCorrect: contextual
859859
VersionAdded: '1.14'
860-
VersionChanged: "<<next>>"
860+
VersionChanged: '2.31'
861861
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
862862

863863
RSpec/ScatteredSetup:
864864
Description: Checks for setup scattered across multiple hooks in an example group.
865865
Enabled: true
866866
AutoCorrect: contextual
867867
VersionAdded: '1.10'
868-
VersionChanged: "<<next>>"
868+
VersionChanged: '2.31'
869869
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
870870

871871
RSpec/SharedContext:

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: rubocop-rspec
22
title: RuboCop RSpec
3-
version: ~
3+
version: '3.0'
44
nav:
55
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_rspec.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ expect(foo).to be(true)
201201
| Yes
202202
| Command-line only
203203
| 2.20
204-
| <<next>>
204+
| 2.31
205205
|===
206206
207207
Prefer using `be_empty` when checking for an empty array.
@@ -1155,7 +1155,7 @@ describe 'Something', :a
11551155
| Yes
11561156
| Command-line only (Unsafe)
11571157
| 1.7
1158-
| <<next>>
1158+
| 2.31
11591159
|===
11601160
11611161
Checks if an example group does not include any tests.
@@ -1209,7 +1209,7 @@ end
12091209
| Yes
12101210
| Command-line only
12111211
| 1.39
1212-
| <<next>>
1212+
| 2.31
12131213
|===
12141214
12151215
Checks for empty before and after hooks.
@@ -1512,7 +1512,7 @@ let(:foo) { bar }
15121512
| Yes
15131513
| Command-line only
15141514
| 2.24
1515-
| <<next>>
1515+
| 2.31
15161516
|===
15171517
15181518
Avoid empty metadata hash.
@@ -2129,7 +2129,7 @@ expect { my_app.print_report }.to output('Hello World').to_stdout
21292129
| Yes
21302130
| Command-line only
21312131
| 1.5
2132-
| <<next>>
2132+
| 2.31
21332133
|===
21342134
21352135
Checks if examples are focused.
@@ -2291,7 +2291,7 @@ end
22912291
| Yes
22922292
| Command-line only
22932293
| 1.29
2294-
| <<next>>
2294+
| 2.31
22952295
|===
22962296
22972297
Checks for before/around/after hooks that come after an example.
@@ -3046,7 +3046,7 @@ end
30463046
| Yes
30473047
| Command-line only
30483048
| 1.16
3049-
| <<next>>
3049+
| 2.31
30503050
|===
30513051
30523052
Checks for `let` definitions that come after an example.
@@ -3411,10 +3411,10 @@ end
34113411
|===
34123412
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed
34133413
3414-
| Pending
3414+
| Enabled
34153415
| Yes
34163416
| No
3417-
| <<next>>
3417+
| 3.0
34183418
| -
34193419
|===
34203420
@@ -5038,7 +5038,7 @@ allow(Foo).to receive(:bar).and_return(bar.baz)
50385038
| Yes
50395039
| Command-line only
50405040
| 1.14
5041-
| <<next>>
5041+
| 2.31
50425042
|===
50435043
50445044
Checks for let scattered across the example group.
@@ -5081,7 +5081,7 @@ end
50815081
| Yes
50825082
| Command-line only
50835083
| 1.10
5084-
| <<next>>
5084+
| 2.31
50855085
|===
50865086
50875087
Checks for setup scattered across multiple hooks in an example group.

lib/rubocop/rspec/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RuboCop
44
module RSpec
55
# Version information for the RSpec RuboCop plugin.
66
module Version
7-
STRING = '2.29.2'
7+
STRING = '3.0.0.pre'
88
end
99
end
1010
end

0 commit comments

Comments
 (0)