-
Notifications
You must be signed in to change notification settings - Fork 8
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
Factory bot #83
Factory bot #83
Conversation
Hey, thanks for the PR! However, it's a bit too big for me. I'd prefer if you only changed from fixtures to factory_bot and not also introduce Rubocop and various style changes at the same time. I'm not necessarily against having tools like that in place but that should be done separately. |
Sure, I'll extract out a smaller patch when I have time. |
need anything else to get this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 A few things that I would have done differently (let!
vs before
etc.) but nothing that would prevent me from merging this. Thank you so much!
Let me know if there's something you would like to implement on the site. I have a few smaller features in mind, but you can of course also start with a big one.
|
||
let(:pen) { collected_pens(:monis_wing_sung) } | ||
before { all_pens } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idiomatic way to do this is let!
(same goes for a few other before
blocks above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to try and remember to do it that way for this project.
I've been used to strictly avoiding let!
in favor of explicit before
statements, mainly because I kept flagging rubocop's LetSetup rule. I also just like the idea of all my let
calls merely being recipes rather than explicit setup, but I know there are tradeoffs (see discussion about disabling the LetSetup rule by default, for example).
No description provided.