dgollahon / rspectre

Exorcise the apparitions haunting your tests.
MIT License
74 stars 9 forks source link

Possibly detect missing expectations / useless tests? #25

Open dgollahon opened 5 years ago

dgollahon commented 5 years ago

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: https://github.com/rubocop-hq/rubocop-rspec/issues/208) but might be something that could be caught here more precisely.

jaynetics commented 1 year ago

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 https://github.com/rspec/rspec-core/issues/404 and https://github.com/rspec/rspec-core/issues/598.

dgollahon commented 1 year ago

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