Play/Scala injecting controller into test
问题 So according to Play 2.4 documentation (https://playframework.com/documentation/2.4.x/ScalaTestingWithScalaTest#Unit-Testing-Controllers), the controller should be set up as a trait like this trait ExampleController { this: Controller => def index() = Action { Ok("ok") } } object ExampleController extends Controller with ExampleController in order for a test to work like this class ExampleControllerSpec extends PlaySpec with Results { class TestController() extends Controller with