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

Be able to return all types of a factory easily #7

Open
blakewest opened this issue Sep 24, 2014 · 2 comments
Open

Be able to return all types of a factory easily #7

blakewest opened this issue Sep 24, 2014 · 2 comments

Comments

@blakewest
Copy link
Contributor

I'd like to be able to build a list of multiple types of factories at the same time.

Something like... Replicator.build('user', {rainbow: true}, 3) // would return regular user, plus user with trait('hasCard') + user with trait('withEmail'). Or whatever. But return one instance of each type of User, in an array.

Or better yet, come up with an elegant syntax for building an array of different types of Factories from your choice.

Basically... trying to avoid doing

var invoiceList = [ Replicator.embed('invoice'), Replicator.embed('invoice', {'failed': true}), Replicator.embed('invoice', {'paidWithCash': true}) ]
@melcher
Copy link
Member

melcher commented Jan 19, 2015

@EpiphanyMachine hello!

@EpiphanyMachine
Copy link
Member

@melcher hey!

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

No branches or pull requests

3 participants