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

Factory bot #83

Merged
merged 2 commits into from
Jun 4, 2018
Merged

Factory bot #83

merged 2 commits into from
Jun 4, 2018

Conversation

valthon
Copy link
Contributor

@valthon valthon commented May 15, 2018

No description provided.

@ujh
Copy link
Owner

ujh commented May 16, 2018

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.

@valthon
Copy link
Contributor Author

valthon commented May 16, 2018

Sure, I'll extract out a smaller patch when I have time.

@valthon
Copy link
Contributor Author

valthon commented May 31, 2018

need anything else to get this merged?

Copy link
Owner

@ujh ujh left a 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 }
Copy link
Owner

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

Copy link
Contributor Author

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

@ujh ujh merged commit 041cb48 into ujh:master Jun 4, 2018
@valthon valthon deleted the factory_bot branch June 5, 2018 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants