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

Fix invalid chargeback factories #13310

Merged
merged 2 commits into from
Dec 23, 2016

Conversation

imtayadeway
Copy link
Contributor

@imtayadeway imtayadeway commented Dec 22, 2016

These factories do not pass factory girl's built-in linter because they follow an anti-pattern of defining an "abstract" factory from which one or more fixture-style factories inherit. This can lead to obscure/brittle tests. To remedy this, I've removed child factories and given the "abstract" factories everything they need to build a valid model. Then, in the test body, I've updated to specify the attributes that are being tested when the object gets built, making them IMO more readable.

@miq-bot add-label test, technical debt
@miq-bot assign @jrafanie

@miq-bot
Copy link
Member

miq-bot commented Dec 22, 2016

Checked commits imtayadeway/manageiq@ebb7875~...295f6a4 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
8 files checked, 0 offenses detected
Everything looks good. ⭐

@kbrock kbrock assigned kbrock and unassigned jrafanie Dec 23, 2016
@kbrock kbrock merged commit 9039ebf into ManageIQ:master Dec 23, 2016
@chessbyte chessbyte added this to the Sprint 51 Ending Jan 2, 2017 milestone Jan 31, 2017
@imtayadeway imtayadeway deleted the test/fix/chargeback-factories branch February 13, 2017 18:37
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.

5 participants