-
Notifications
You must be signed in to change notification settings - Fork 31
Description
When running Scalatest integration tests for Play2 using the scalatestplus API assets are not correctly hosted. Test run correctly from CLI sbt.
This appears to be because the test classpath does not include the assets folder as it does when running within sbt.
Steps to reproduce:
- Clone test case project (
git clone [email protected]:rgladwell/scalaide-scalatest-play-integration.git) - Install the sbt-eclipse plugin globally
- Run
sbt eclipse - Import the project in Eclipse
- Go to Run -> Run Configurations and create a new configuration
- Create new run configuration with the Type as "Package". Select "integration" as the package name
- Hit Run
Expected result: tests should pass as they do when you execute sbt test from the command line.
Actual result: Tests fail as the started Scalatest server is not correctly hosting the assets (404 was not equal to 200)
Workaround: http://stackoverflow.com/a/25051844/48611
The workaround (adding the assets folder to the test classpath) should be automatically done by the Scala IDE Play plugin though.
Test case project: https://github.com/rgladwell/scalaide-scalatest-play-integration