How can I set up dummy data with FactoryGirl?
Is there a way to set up dummy data with a factory in my integrated development environment?
How can I set up dummy data with FactoryGirl?
Is there a way to set up dummy data with a factory in my integrated development environment?
I write a seed scribt to solve my problem:
in /db/seed.rb i implemented factory_girl and use a csv file to define custom datas.
seed.rb:
If you want to associate models with your test datas you can use FactoryGirl to create associated objects:
You can also use the first CSV scribt and implement an factory wich create comments for each post.
Now you can use FactoryGirl to create x records for testing datas with csv.