views:

27

answers:

1

I did rake test:prepare and clone the db. Then when I do spec spec/controllers/file, it migrates the db every single time.

Is that supposed to do that? I thought it was only supposed to migrate the dbs once.

Thanks

A: 

No it shouldn't do that. I think that you'd be good by just cloning the database (rake db:test:clone) and running the tests.

rake db:test:clone - Recreate the test database from the current environment's database schema.

Once you ran that, there is no reason for the database to migrate on each test

marcgg
I did do that, but its still doing it. Its an open source soft, so maybe there's something in the code that makes it recreate the db every time. Also I noticed when I try to drop db, I get unknown db and when I try to create db, I get already exists...maybe that's got something to do with it. At any rate, the problem is just local to this app, so I don't mind too much. Thanks for your reply.
Senthil