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:
181181 Enabled : true
182182RSpec/RemoveConst :
183183 Enabled : true
184+ RSpec/RepeatedSubjectCall :
185+ Enabled : true
184186RSpec/SkipBlockInsideExample :
185187 Enabled : true
186188RSpec/SortMetadata :
Original file line number Diff line number Diff line change 44
55- Support correcting ` assert_nil ` and ` refute_nil ` to ` RSpec/Rails/MinitestAssertions ` . ([ @G-Rath ] )
66- Fix a false positive for ` RSpec/ExpectActual ` when used with rspec-rails routing matchers. ([ @naveg ] )
7+ - Add new ` RSpec/RepeatedSubjectCall ` cop. ([ @drcapulet ] )
78
89## 2.26.1 (2024-01-05)
910
@@ -848,6 +849,7 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
848849[ @deivid-rodriguez ] : https://github.com/deivid-rodriguez
849850[ @dgollahon ] : https://github.com/dgollahon
850851[ @dmitrytsepelev ] : https://github.com/dmitrytsepelev
852+ [ @drcapulet ] : https://github.com/drcapulet
851853[ @drowze ] : https://github.com/Drowze
852854[ @dswij ] : https://github.com/dswij
853855[ @dvandersluis ] : https://github.com/dvandersluis
Original file line number Diff line number Diff line change @@ -813,6 +813,12 @@ RSpec/RepeatedIncludeExample:
813813 VersionAdded : ' 1.44'
814814 Reference : https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedIncludeExample
815815
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+
816822RSpec/ReturnFromStub :
817823 Description : Checks for consistent style of stub's return setting.
818824 Enabled : true
Original file line number Diff line number Diff line change 8787* xref:cops_rspec.adoc#rspecrepeatedexamplegroupbody[RSpec/RepeatedExampleGroupBody]
8888* xref:cops_rspec.adoc#rspecrepeatedexamplegroupdescription[RSpec/RepeatedExampleGroupDescription]
8989* xref:cops_rspec.adoc#rspecrepeatedincludeexample[RSpec/RepeatedIncludeExample]
90+ * xref:cops_rspec.adoc#rspecrepeatedsubjectcall[RSpec/RepeatedSubjectCall]
9091* xref:cops_rspec.adoc#rspecreturnfromstub[RSpec/ReturnFromStub]
9192* xref:cops_rspec.adoc#rspecscatteredlet[RSpec/ScatteredLet]
9293* xref:cops_rspec.adoc#rspecscatteredsetup[RSpec/ScatteredSetup]
Original file line number Diff line number Diff line change 113113require_relative 'rspec/repeated_example_group_body'
114114require_relative 'rspec/repeated_example_group_description'
115115require_relative 'rspec/repeated_include_example'
116+ require_relative 'rspec/repeated_subject_call'
116117require_relative 'rspec/return_from_stub'
117118require_relative 'rspec/scattered_let'
118119require_relative 'rspec/scattered_setup'
You can’t perform that action at this time.
0 commit comments