All you need is to setup connection for several databases for example:
package models
import org.squeryl.adapters.{H2Adapter}
import org.squeryl.Session
import play.api.Application
import play.api.db.DB
object TestConn {
def test_session(app : Application) = Session.create( DB.getConnection("test")(app), new H2Adapter)
}
And then in you BarSpec:
.....
"A Bar" should "be creatable" in {
running(FakeApplication()) {
transaction(TestConn.test_session(current)){
val bar = AppDB.barTable insert Bar(Some("foo"))
bar.id should not equal(0)
}
}
}
.....
Notice that you might have conf/evalutions/test directory with your database schema for these case.