Closed nalanj closed 12 years ago
So, after a ton of digging and searching, I don't think this is a good idea right now. ActiveRecord implements their purging of DB schemas in a rake task, so it's not reusable at present. Additionally, rebuilding the schema manually with rake db:test:load
gives better performance in general, rather than running it every time.
In the future I may try and send a pull request to Rails that factors the purge code out into something reusable. Then we could implement this super easily.
Closing this for now
At a minimum the Rails environment should drop and load the test db schema. Ideally it would happen only if it needs to be updated and would happen between each test run.