Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RFE: detect overriden let() helpers in Rspec tests #3769
RuboCop will warn me when let() helper has been defined twice inside my rspec examples
The following piece of RSpec code will produce a segmentation fault. See
However RuboCop doesn't detect that as an offence. In practice the problem was hidden under layers of shared examples and became obvious after I expanded the code to see what it does. Sounds like an easy thing to do for RuboCop, doesn't it ?
Steps to reproduce the problem
With rubocop-rspec added I get:
@backus I guess this falls under rubocop-rspec, let me know if you want me to open the RFE under the other repo ?
@atodorov this would be more appropriate for rubocop-rspec but I would probably still say that it isn't a great task for static analysis. I have a project (backus/rspec-lint) which I think is better suited for this sort of detection. All it currently does it detect unused