File tree Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,8 @@ RSpec/RedundantPredicateMatcher:
181
181
Enabled : true
182
182
RSpec/RemoveConst :
183
183
Enabled : true
184
+ RSpec/RepeatedSubjectCall :
185
+ Enabled : true
184
186
RSpec/SkipBlockInsideExample :
185
187
Enabled : true
186
188
RSpec/SortMetadata :
Original file line number Diff line number Diff line change 4
4
5
5
- Support correcting ` assert_nil ` and ` refute_nil ` to ` RSpec/Rails/MinitestAssertions ` . ([ @G-Rath ] )
6
6
- Fix a false positive for ` RSpec/ExpectActual ` when used with rspec-rails routing matchers. ([ @naveg ] )
7
+ - Add new ` RSpec/RepeatedSubjectCall ` cop. ([ @drcapulet ] )
7
8
8
9
## 2.26.1 (2024-01-05)
9
10
@@ -848,6 +849,7 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
848
849
[ @deivid-rodriguez ] : https://github.com/deivid-rodriguez
849
850
[ @dgollahon ] : https://github.com/dgollahon
850
851
[ @dmitrytsepelev ] : https://github.com/dmitrytsepelev
852
+ [ @drcapulet ] : https://github.com/drcapulet
851
853
[ @drowze ] : https://github.com/Drowze
852
854
[ @dswij ] : https://github.com/dswij
853
855
[ @dvandersluis ] : https://github.com/dvandersluis
Original file line number Diff line number Diff line change @@ -813,6 +813,12 @@ RSpec/RepeatedIncludeExample:
813
813
VersionAdded : ' 1.44'
814
814
Reference : https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedIncludeExample
815
815
816
+ RSpec/RepeatedSubjectCall :
817
+ Description : Checks for repeated calls to subject missing that it is memoized.
818
+ Enabled : pending
819
+ VersionAdded : " <<next>>"
820
+ Reference : https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedSubjectCall
821
+
816
822
RSpec/ReturnFromStub :
817
823
Description : Checks for consistent style of stub's return setting.
818
824
Enabled : true
Original file line number Diff line number Diff line change 87
87
* xref:cops_rspec.adoc#rspecrepeatedexamplegroupbody[RSpec/RepeatedExampleGroupBody]
88
88
* xref:cops_rspec.adoc#rspecrepeatedexamplegroupdescription[RSpec/RepeatedExampleGroupDescription]
89
89
* xref:cops_rspec.adoc#rspecrepeatedincludeexample[RSpec/RepeatedIncludeExample]
90
+ * xref:cops_rspec.adoc#rspecrepeatedsubjectcall[RSpec/RepeatedSubjectCall]
90
91
* xref:cops_rspec.adoc#rspecreturnfromstub[RSpec/ReturnFromStub]
91
92
* xref:cops_rspec.adoc#rspecscatteredlet[RSpec/ScatteredLet]
92
93
* xref:cops_rspec.adoc#rspecscatteredsetup[RSpec/ScatteredSetup]
Original file line number Diff line number Diff line change 113
113
require_relative 'rspec/repeated_example_group_body'
114
114
require_relative 'rspec/repeated_example_group_description'
115
115
require_relative 'rspec/repeated_include_example'
116
+ require_relative 'rspec/repeated_subject_call'
116
117
require_relative 'rspec/return_from_stub'
117
118
require_relative 'rspec/scattered_let'
118
119
require_relative 'rspec/scattered_setup'
You can’t perform that action at this time.
0 commit comments