I find fixtures a bit tedious to use in Ruby on Rails, partly because I need to manually correct them after most migrations.
Is there a way (a plugin?) I can have my fixtures modified when I run my migrations?
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.
Adding to womble’s answer above, you can generate fixtures from your dev database using topfunky’s ar_fixures plugin:
http://github.com/topfunky/ar_fixtures/tree/master
In my opinion, there’s still a valid place for a small, well managed set of fixtures in rails – as there is for mock objects… but we’ll leave that for another day!
Also worth considering the fixture-sets-for-rails plugin, though I haven’t used it myself: http://thatswhatimtalkingabout.org/news/2006/8/31/fixture-sets-for-rails Seems like a reasonable idea, although I’d be very wary of building a mass of confusing sets of fixtures – each of which you may have to fix when your domain model changes. I’d probably stick to mocks instead (this plugin looks quite old and was probably written before a mocha turned up).