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

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -