Frederick, Thanks. So, my desire to have pre-populated (whether from seeding or otherwise) databases available in testing is unusual? I would have expected a basic interest in having any and all development data, e.g., zip code data, available for testing purposes, but my takeaway from your response is that testing is typically performed on a limited subset of development/production data that has been supplied from fixtures. Can you please confirm?
Thanks, Grar On Apr 10, 9:52 am, Frederick Cheung <[email protected]> wrote: > On Apr 10, 2:30 pm, Grary <[email protected]> wrote:> Hi, > > > I'd like to have the results of a migration file that prepopulates my > > development database available for testing. So, right now, after the > > usual rake migration, I can access my prepopulated data via script/ > > console, but not in my unit tests. I've reviewed comments on this > > subject but the custom rake tasks do not work or attempting a fix with > > RAILS_ENV=test rake db:migrate as a command does not help either. Any > > suggestion on how I can get the results of my migration available in > > the test environment? > > The test database is filled with the data from your fixture files - > running migrations against it accomplish nothing because it is wiped > at the start of the test run. Your best bet is probably to write > something that will dump yml from your database. You should consider > using db/seeds.rb to seed your database - migrations are not intended > to fufill that need. > > Fred > > > Thanks, > > > Grar -- 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.

