Skip to content

app implicit is null in GuiceOneAppPerTest #107

@christianri

Description

@christianri

Hi Scalatest team,

I seem to have the issue that the app implicit is null when using the GuiceOneAppPerTest trait for testing. When I use GuiceOneAppPerSuite it is fine. I discovered this when investigating why my dependency injection in the test did not work as expected: Link

Scala version 2.12.3, play 2.6.3 and scalatestplus-play 3.1.2.

To reproduce:

  • Create a new play project: sbt new playframework/play-scala-seed.g8
  • Add a simple println into the test which uses GuiceOneAppPerTest: println("App object", app)

Expected result: app is defined
Actual result: app is null

If you could please investigate that is is really an issue or wrong use from my end or the g8 template. Thank you very much for this great framework!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions