How can I fix the missing implicit value for parameter ta: TildeArrow in a test spec

后端 未结 7 965
臣服心动
臣服心动 2021-01-01 15:14

I\'m working on a simple test spec using spray and I can\'t get it to compile correctly, don\'t know if I\'m doing anything wrong. My version of scala is 2.9.3 and spray 1.0

7条回答
  •  长发绾君心
    2021-01-01 15:58

    I can reproduce the precise same error message with Scala 2.10 if myRoutes is not actually a route but a Directive[HNil].

    I am therefore guessing that in your unshown service.MyProxy class your route does not complete.

    ie

    trait MyProxy extends HttpService {
       val myRoutes = path("foo") 
    }
    

    Gives this error

    trait MyProxy extends HttpService {
      val myRoutes = path("foo") {
       complete(StatusCodes.Accepted)
     }
    }
    

    Does not.

提交回复
热议问题