在 Spray.io 测试规范中添加 headers 无法将请求发送到路由中

Adding headers in a Spray.io Test Spec fails to send the request into the route

我正在使用 Spray 1.3.3。我的规范如下所示:

"Add a collection using a PATCH with correct update hash" in {
  Patch("/datastore/collections/FMI", CollectionPatch(addPriceCodes =
    Some(List(PriceCode("AMI", "22", None))))) ~>
    addHeader(hashHeader, updateHash) ~> routes ~> check {
    status should equal(Accepted)
  }
}

这在我看过的文档中看起来应该是这样,并且它可以编译,但是当我 运行 它时,我得到了 500 的回报。如果我在路由中设置断点,我永远不会进入它内部(我在其他不添加 header 的测试函数中这样做)。在 IntelliJ 中,我收到一条错误消息,指出它无法解析 addHeaderroutes 之间的符号 ~>

添加header发送到路由的正确方法是什么?

事实证明,我上面列出的内容工作正常。我正在进入我的路线,并且在异常回溯中看到了错误的东西。