On Apr 10, 2:30 pm, Grary <grary.sti...@gmail.com> 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.