dgollahon/rspectre

Possibly detect missing expectations / useless tests?

Opened this issue · 2 comments

Even with dynamic runtime analysis, there might be some false positives and this might be out of scope for what this project is about, but I could consider trying to detect missing expects / examples without assertions. It's hard to do accurately, statically (see: rubocop/rubocop-rspec#208) but might be something that could be caught here more precisely.

I thought this should perhaps rather be a toggleable feature of rspec itself, went looking for it, and found some interesting discussion of the idea and some worthwhile counter-arguments in rspec/rspec-core#404 and rspec/rspec-core#598.

Cool, thanks for the links! Will read when I get a chance and leave my opinion for what rspectre should eventually do.