scala - Play: Run tests with custom GuiceApplicationLoader -


i have customapplicationloader extends guiceapplicationloader in loading environment specific conf file. when run tests in applicationspec values taken environment specific conf files missing supposedly means customapplicationloader hasn't been executed.

any idea how pass customapplicationloader on fakeapplication or other approach read values conf files during tests? or shouldn't work out of box?

so found out can inject custom guiceapplicationloader passing argument withapplicationloader this:

    @runwith(classof[junitrunner]) class applicationspec extends specification {    "my component" should {      "load environment specific conf values loaded in customapplicationloader" in new withapplicationloader(new customapplicationloader) {         ...       }     }  } 

Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -