Questions tagged [spec2]

21 questions
0
votes
1 answer

Specs2 Scala bug not evaluating strings to be the same

I have the following spec2 test import akka.testkit._ import akka.actor.ActorSystem import com.github.nfldb.config.{NflDbApiActorSystemConfig, NflDbApiDbConfigTest} import org.scalatest.MustMatchers import org.specs2.mutable.Specification import…
Chris Stewart
  • 1,554
  • 1
  • 27
  • 58
0
votes
1 answer

How to unit test controller action with json body?

Lets say I have a case class with json writer provided val song1 = Song("Song one", "Artist 1", "Song url 1") I then try to invoke a controller action create with parser…
Khanetor
  • 9,495
  • 8
  • 31
  • 67
0
votes
1 answer

Why use Specs2 over JUnit?

We went through online material such as scalatest site. What are advantages of using scala testing framework Specs2? How does it add to the project over JUnit?
0
votes
1 answer

Spec2 :how to see failing test stacktrace and resolve "parseBody" keyword not found

I need to know two things here : 1. How to see the stacktrace of the failing test case? Right now I only see the line number it failed and the result. See the outcome of the test case below : x return status 200 [error] '404' is not equal to…
Amit Jain
  • 1,340
  • 8
  • 15
0
votes
1 answer

How to use "eventually" with "Specs2RouteTest"

There are two specs here. First is not passing because eventually in check will not cause whole route rerun but this is the way I would prefer to follow. The second spec is the best solution I found (and prove that it is doable ;) ) but it contains…
panurg
  • 231
  • 2
  • 9
-1
votes
1 answer

How to follow redirects inside test cases?

Based on: Testing a page that is loaded after a redirect Play!2.0 Framework (Scala) does have API which we can use to make redirects. However is there any way in Play Framework ( Scala ) that the test case automatically follows redirect responses. I…
tuxdna
  • 7,669
  • 3
  • 36
  • 59
1
2