Skip to content

jonikarppinen/play-specs2-testbench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play 2.4 and Specs2 testbench

Get started

Requirements: JDK 1.8 and sbt

sbt test
sbt run

Topics

Using test-only outside the sbt console

See this Stack Overflow question.

How to get commands like these to work as intented, outside sbt console?

$ sbt test-only services.UserServiceSpec
$ sbt test-only -- include unit

Try it; both of the above run all tests.

"Can't find a constructor for class ..."

See this Stack Overflow question.

The recommended Play 2.4 approach of using classes and DI (instead of singletons), does not seem to work seamlessly with Specs2, Play's default test framework in all cases.

Solution: cleanest way to get classes wired up also in tests seems to be a DI test helper along these lines

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages