Top "Specs2" questions

Executable software specification tool that specifies behaviour both at the class and application level using Scala.

How to test methods that return Future?

I'd like to test a method that returns a Future. My attempts were as follows: import org.specs2.mutable.Specification …

scala specs2
How to run specifications sequentially

I want to create few specifications that interoperate with database. class DocumentSpec extends mutable.Specification with BeforeAfterExample { sequential def before() = {…

scala specs2
Play 2.0 FakeApplication setup with test configuration

I have a specs2 test which uses a FakeApplication and an embedded mongodb database. def inMemoryMongoDatabase(name: String = "default"): Map[…

scala mongodb playframework-2.0 specs2
Play specs with configuration break because "There is no started application"

I externalized some strings to HOCON, on application.conf. I'm accessing the configuration values like this: import play.api.Play.…

configuration playframework-2.0 specs2
How to run an embedded elastic search instance for testing

I'm working in a setup that has an embedded elastic search instance for unit testing purposes, but when I run …

elasticsearch specs2
running multiple tests within the same FakeApplication() in play 2.0 scala

I am trying to learn the unit tests in Play scala, but I am running into some issues. I am …

unit-testing scala playframework-2.0 specs2
How to force Logger.debug output in Play! framework specs2 tests?

By default all Logger output, visible when an application is running, is mute when the application is tested. How to …

scala playframework playframework-2.0 specs2
How do I verify invokations with specific string matchers in Specs2 with Mockito

I have a test along these lines: httpClient.post(anyString, anyString) returns (first, second) //do my thing there were two(…

scala mockito specs2
Specs2: Ignore specification with a message?

I need to put one of my test cases into a "pending" state. I would like to assing some sort …

scala testing specs2
play framework 2: test a request with a json string as body

I have the following action def save() = Action(parse.json) { implicit request => request.body.asOpt[IdeaType].map { ideatype => …

scala testing playframework-2.0 specs2