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
FactoryGirl usage #66
Comments
Requiring |
Thanks for the fast reply. It should work like you described but it doesn't. Maybe the problem is that I write rails engine not rails application, so factories are defined inside engine |
I manage to get somewhere when I change my preview file to: spec/dummy/app/mailer_previews/mynamespace/order_mailer_preview.rb
But I works only on first page view! After page reload my factories get unregistered (line |
Use |
I've "upgraded" my requires to:
But I'm still getting |
It might be my fault so I close the issue. For anyone interested I've created SO topic http://stackoverflow.com/questions/36965377/rails-factorygirl-inside-app-in-development-env where I post an answer if I'll ever find one. |
Resolved at least for now. Solution described at SO, it was Devise related issue. |
Is it possible to mock data using FactoryGirl?
It will be very useful feature as if you use it for tests you probably have all factories ready.
I've tried to use it as follow:
spec/dummy/app/mailer_previews/mynamespace/order_mailer_preview.rb
But I'm getting
Factory not registered: order
error.What is strange my
FactoryGirl.find_definitions
returns correct file set:The text was updated successfully, but these errors were encountered: