Reputation: 11427
I need some resources (text files) for my tests in a Scala Play 2.0 application. Where can I put these files?
In a maven app I would put them into src/test/resources
, but I cannot find anything about an equal directory in the Play documentation.
I can put them in the conf
directory, but I only need them when I test the application.
Upvotes: 28
Views: 7041
Reputation: 1
or nowadays, less deprecated:
$ sbt "show Test/resourceDirectory"
...
[info] /path/to/project/test/resources
Upvotes: 0
Reputation: 12735
Elevating SathOkh's comment for more visibility.
With sbt 1.3.13:
$ sbt "show test:resourceDirectory"
...
[info] /path/to/project/test/resources
Upvotes: 3
Reputation: 7542
Call
play "show test:resource-directory"
in the console and it shows you the absolute path to your resource directory in test mode. It will be in "test/resources".
"show" is a sbt command (or task) that enables you to retrieve the values of settings.
Upvotes: 49