Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only report FeatureEnvy for instance methods #1338

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

mvz
Copy link
Collaborator

@mvz mvz commented Jun 13, 2018

#1337.

This restores the symmetry with UtilityFunction, which also reports only on instance methods.

@@ -247,4 +247,49 @@ def alfa(bravo)

expect(src).not_to reek_of(:FeatureEnvy)
end

it 'does not report on class methods defined by opening the metaclass' do
src = <<-EOS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the name of the language as a delimiter (i.e. RUBY), most editors will provide syntax highlighting for the code example. 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice. I'm leaving it as-is for now to match the rest of the specs. Then we can change all of them in one go.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the name of the language as a delimiter (i.e. RUBY), most editors will provide syntax highlighting for the code example

Super cool indeed, didn't know that!

EOF

expect(src).not_to reek_of(:FeatureEnvy)
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice specs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants