TL/DR: I need a way to run tests without dropping the target database.
I have two instances of a Heroku-Postgres database: 'app-dev' and 'app-test'. I would like to use them for development and testing a new Rails 4 app. The development DB works as expected, but the test database cannot be used in the way one would usually work with a local PG database.
When trying to run tests via rake db:test:prepare --trace
I get an error that boils down to:
db:load_config
db:test:purge
rake aborted!
FATAL: permission denied for database "postgres"
DETAIL: User does not have CONNECT privilege.
This is because heroku does not allow the dropping of databases. So my question would be: how to run these tests without dropping the whole database and instead dropping just the database objects? Custom rake task? Toolbelt command?