Re: Problem with test_truth

Frederick Cheung
Sun, 22 Feb 2009 16:21:17 -0000

On Feb 22, 3:48 pm, Phlip
<phlip2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Hello Guy wrote:
> > thanks, i know, in test database are not tables. my question is: why
are
> > not
> > the tables for test database create?
> > i did database migration and it creates only tables for development
> > database but
> > not for my test database. where can be the problem?
>
> I find the rake db:migrate commands to be less than comprehensive here.
> Sometimes one rake command understands testing, but another one does not.
>

If you run

rake

to run  your unit tests, that should clone the structure from the
development database to the test one.

Fred
> In this case, I always find myself entering:
>
>    rake RAILS_ENV=test db:migrate
>
> That uses rake''s ability to push its command line options with =
into
> environmental variables. Then the migrator uses the test: version in
database.yml.
>
> Also try db:reset, or db:migrate:reset.
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com