Re: Problem with test_truth

Phlip
Sun, 22 Feb 2009 15:48:49 -0000

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.

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.