Two databases in testing

Following is what I use for the same scenario (Better solutions welcome) I set one of these up for each database I use and use the appropriate class method for each model to tell it where it resides.

The XXX_DATABASE is set in the environment.rb. Just contains the database name.

I don't use database_production either, the production database is simply named database. Also, my development database is also named database since it lives on a different server. Those terms are just too long for my taste. database_prod and database_dev would have been nicer.

Also, I put these files in /lib, named xxx_database.rb