I have a Rails 2.x app with no tests. I can write out the tests manually, but is there a way to generate fixtures automatically? It would be nice to not have to type all that out by hand.
I could run script/generate again for all the models, but everything already exists and if I understand generators correctly, I’d still have to type in all the attributes.
I thought about running the Rails console and doing for example…
>> y VendorUser.all.rand
That would give me some YAML with all the attributes, but they’d be out of order and it’s still pretty time-consuming.
Can anyone suggest a more efficient option?
Here is a rake task to generate fixtures.