How do you prefer to organize your test data in Ruby on Rails?

How do you prefer to organize your test data in Ruby On Rails: lights, object factories, or something else? Why?

0


a source to share


1 answer


Object factories are much less fragile than fixtures, and when they break because you reset the database schema, there is much less effort to fix them. Some gems also know how to intelligently automate the construction of associations between factory objects.



Factory The girl and the driver are in fashion now. I also use Faker to generate random strings; not necessary, but fun.

0


a source







All Articles