Anthony Crumley wrote:
> Grar,
> 
> My recommendation would be to not pre-populate with a migration.  I 
> would
> create a ruby script for that and have developers run that script to get
> setup.  Then I would run that script in the test/test_helper.rb setup or
> where ever is appropriate if I wanted that data available in my tests.
> 

Yes.  In fact, Rails 2.3 has seeding built in, and for older versions, 
there's seed-fu.

Seed data does not belong in migrations.

> A  more conventional approach would be to create fixtures with the test
> data.  Then you can load those fixtures into your development database 
> with
> "rake db:fixtures:load".

No.  Fixtures are a broken feature of Rails and should be avoided at all 
costs.  Use factories instead.

> 
> Anthony Crumley
> http://commonthread.com

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to