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

How to load seed data for unit tests? #5308

Closed
lilith opened this issue Sep 2, 2014 · 1 comment
Closed

How to load seed data for unit tests? #5308

lilith opened this issue Sep 2, 2014 · 1 comment

Comments

@lilith
Copy link

lilith commented Sep 2, 2014

How can one load spree seed data to run unit tests against?

@JDutil
Copy link
Member

JDutil commented Sep 3, 2014

You shouldn't load all the seed data for unit tests you should only create the data you need for the test.

In your application or extension specs you can use the available spree factories by adding:
require 'spree/testing_support/factories'

To your spec_helper.rb file.

Please direct general questions to our mailing list https://groups.google.com/forum/#!forum/spree-user as we only use github for tracking issues.

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

2 participants