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

后端 未结 7 967
臣服心动
臣服心动 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:59

    To expand a bit on previous answers given, there are some implicits which shouldn't be declared by any other Trait or class that is extends by your Test Class :

    • the ActorSystem
    • the ExecutionContext
    • the DefaultHostInfo (package akka.http.scaladsl.testkit)
    • the ActorMaterializer

    if any of these is declared elsewhere than in ScalatestRouteTest, you'll have the following error thrown :

    could not find implicit value for parameter ...TildeArrow[RequestContext, SomethingHereOther]
    

提交回复
热议问题