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.

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".

Anthony Crumley
http://commonthread.com

On Sat, Apr 10, 2010 at 8:59 AM, 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?
>
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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