spec2

Request was not handled with spray-testkit

感情迁移 提交于 2019-12-11 12:32:54
问题 My service route: get( path("add" / IntNumber / IntNumber)( (a, b) => complete((a + b).toString()) ) ) ~ post( path("add") ( formFields('a.as[Int], 'b.as[Int]) { (a, b) => complete((a + b).toString()) }) ) my spec: import spray.http.FormData class RouteDefinitionSpec extends org.specs2.mutable.Specification with org.specs2.ScalaCheck with spray.testkit.Specs2RouteTest with RouteDefinition { def actorRefFactory = system "the route" should { "add with get requests" in { prop { (a: Int, b: Int)