[EN] Deep down fixtures
Rails endorses fixtures to build and maintain test data in our web apps. Fixtures look very easy at first. Just a YAML file and we auto-magically get users(:john) in our tests.
As our requirements grow, we start fighting with fixtures. How to get ordered records. How to use my own values for ids, timestamps? How to maintain associations? How to generate on the fly dynamic data?
Lets seek answers to these questions by going deep down fixtures internals. In the process we will also see how others like FactoryGirl are doing this task of generating and maintaining test data.
- Job title
I am doing open source contribution from last 2 years mostly in Ruby related projects. I have also contributed to Rails. I help maintaining codetriage.com( where we use fixtures :-) ) and Httmultiparty gem. I am actively involved in Ruby community in Pune and help in organizing local meetups.
- Pune, India