Rails testing – Setup multiple databases when running rake spec

By | October 29, 2013

We currently have 2 databases for our application and I had a need to basically setup both databases, our test database, and another stats database.

I also noticed an issue where running rake spec wouldn’t run in the test environment, which we always wanted it to run it. My solution is the below (Note: We have a db_stats task that basically mimics all the calls of db):

Leave a Reply

Your email address will not be published. Required fields are marked *