Play Slick: How to inject DbConfigProvider in tests
问题 I am using Play 2.5.10, Play-slick 2.0.2, and my activator-generated project comes with scalatest and code like this: class TestSpec extends PlaySpec with OneAppPerSuite {...} I managed to test routes/Actions; now I would test DAO methods on a lower level. I searched the web and SO for a solution, and could not find any that is still up-to-date. A DAO signature is like this: class TestDAO @Inject()(protected val dbConfigProvider: DatabaseConfigProvider) extends HasDatabaseConfigProvider