gma / tconsole

Testing console for Rails. Helps out with test performance and also makes it easier to run specific tests
177 stars 18 forks source link

Test schema reloading with Rails #42

Closed nalanj closed 12 years ago

nalanj commented 12 years ago

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.

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