Skip to content

Start using ember-cli-mirage factories #850

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

Merged
merged 5 commits into from
Jul 3, 2017

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jul 2, 2017

Instead of using fixtures it is recommended to use factories to setup acceptance tests. This PR introduces a first set of factories and uses them in a few of the existing tests to simplify them. This PR is not yet converting everything to factories, but can be merged at any point.

@samselikoff would be awesome if you could give this a quick review :)

@Turbo87 Turbo87 requested a review from locks July 2, 2017 21:10
@samselikoff
Copy link

samselikoff commented Jul 3, 2017

Looks good so far! I think for stuff like this

features: () => {},

You could just write

features: {}

But it doesn't really matter

@Turbo87
Copy link
Member Author

Turbo87 commented Jul 3, 2017

@samselikoff the difference is that with () => {} you get a new object for every instance, while with just {} the same object instance is used for every factory object.

@Turbo87 Turbo87 merged commit f5a1523 into rust-lang:master Jul 3, 2017
@Turbo87 Turbo87 deleted the mirage-factories branch July 3, 2017 06:53
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.

3 participants