I have big database (more than 100 tables, more than 5GB)
Is there a possibility to generate related fixtures for testing from this database, just about 3-5 records per table (but with neeeded relations)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Better to use Factories than fixtures.
Check out factory girl
With factories you can create test records as and when required. They’ll automatically build the necessary related objects too.
So if you have Post with many Comments you just have to call
Factory(:create, :comment)which will create a valid Comment and it’s parent Post.