I have a scala application with some test using org.scalatest. These test need some global setup (and teardown), in order to manage the test database.
Please don't tell me my tests should not hit the database and I should do it the Java-DAO-Stub-WTF-Overkill-Way™ :-).
I'm running the tests using SBT, which provides a way to execute code before and after test:
testOptions in Test += Tests.Setup( () => println("Setup") )
testOptions in Test += Tests.Cleanup( () => println("Cleanup") )
Unfortunately I cannot access the classes in question there. Unsurprisingly, importing them into build.sbt does not work either.
Any ideas?