-
Notifications
You must be signed in to change notification settings - Fork 148
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
README: Add example of dependent factory #239
README: Add example of dependent factory #239
Conversation
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.
I think this is a great addition! Just a couple comments. Thanks for suggesting this 👍
README.md
Outdated
@@ -104,6 +104,14 @@ defmodule MyApp.Factory do | |||
} | |||
end | |||
|
|||
# dependent factory |
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.
I think # Modify existing factories
might be more clear here. What do you think?
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.
Maybe derived factories
? That's something I searched for first.
README.md
Outdated
%MyApp.Article{ | ||
article_factory | | ||
featured: true, | ||
} |
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.
I think this syntax is a bit nicer. What do you think? struct!(article_factory, %{featured: true})
Rebased on master. |
Thanks @nathanl! This is definitely a point of confusion. |
This may seem obvious, but it took me a few minutes to figure out and I thought it would be nice to show.