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.
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:
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.