1. 3

  2. 1

    This certainly works; another thing that I’ve found is really good is the codahale/testdb package, which comes with hooks to create and drop arbitrary database schemas under random DB names, for testing. I’ve used it quite successfully with parallel tests, and would recommend it even if you’re not running parallel tests. (Who knows what state might be left behind on your test DBs with shared names….).