troessner / reek

Code smell detector for Ruby
https://github.com/troessner/reek
MIT License
4.03k stars 279 forks source link

Continue the work on our smell detector specs #1067

Open troessner opened 8 years ago

troessner commented 8 years ago

Merging #1056 was a great step into the right direction but I believe that our smell detector specs are still far from optimal.

I basically have two big issues with them:

1.) Checking for the contexts a smell detector is applied to.

We sometimes do it like this which I consider the best way:

  ['class', 'module'].each do |scope|
    context "Scoped to #{scope}" do

however this is far from consistent. It's basically different in every detector. Quite often we don't do it at all and most of the time we do it differently.

2.) The configuration checks.

We hardly check that configuring a smell detector differently actually works. Same goes for configuration via source code comments.

We should have a consistent and concise way to do this in all detectors without duplicating much and without using shared examples.

mvz commented 8 years ago

I'd like to first get #1042 done, then I'll have another look at this discussion.

troessner commented 8 years ago

Yep, makes sense :)