Skip to content

Disable RSpec/MultipleMemoizedHelpers

Albert requested to merge disable-rspec-multiple-memoized-helpers into master

What does this MR do and why?

This cop expects an arbitrary limit of 25 lets. There doesn't seem to be very good reason why this requires a limit. https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleMemoizedHelpers. Let's disable this as it doesn't seem to have any apparent benefit.

Quoting Rubocop team member Marc-André:

I fought hard against it. To me it is similar to a cop that would raise an offense because you have too many variables. rubocop and rubocop-ast have it disabled, while we typically enable more cops that the default. Note that you could change these let to def and the offenses go away (although you haven't changed anything; let is just syntax sugar for a def).

Sharing your factories seems like a good idea, and I recommend disabling the cop too.

Edited by Albert

Merge request reports