influitive/apartment — pull request #67 by eric88 (2013-06-27 09:04:16+00:00)
Title: Fix for Mysql2SchemaAdapter whe using prepend_environment

The bug occurs when calling Apartment::Database.create("new_db"). It creates "#{Rails.env}_new_db" but then tries to switch to "new_db".

Also changed reset() because otherwise it will try to change to "#{Rails.env}_#{default_database}".

Added a test that demonstrates the issue.