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

Relax factories vs fixtures rule #59

Open
pirj opened this issue Nov 23, 2018 · 0 comments
Open

Relax factories vs fixtures rule #59

pirj opened this issue Nov 23, 2018 · 0 comments

Comments

@pirj
Copy link
Member

pirj commented Nov 23, 2018

Fixtures as something created before suite might be useful, specifically e.g. for a list of countries that are later used by other records (via say, user.country_id especially when there's a foreign key constraint).
There should be a balance between creating all the records, as this may negatively impact the performance when only a few examples are run vs save big when multiple examples are run.

Unfortunately, in Rails, the Rails fixtures are being loaded before each example, and that neglects the benefits, even despite the recently introduced bulk loading.

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

No branches or pull requests

1 participant