Specs2 - "should not equal to" - 如何检查不相等?

Specs2 - "should not equal to" - how to check for non-equality?

在 Specs2 中有很多examples关于如何检查是否相等,但没有关于如何检查不相等的示例。

我尝试了(除其他外)以下方法,但没有用:

"type safe get should work" in {
  Get("/SimpleLine") ~> getRoute[SimpleLine] ~> check {
    responseAs[String] shouldEqual "my name is SimpleLine"
    responseAs[String] shouldNot equal to "my name is SimpleLine2"
  }
}

我怎样才能完成这项工作?

如何检查 Specs2 中的不相等性?

Google 没有帮助。

以下任意一项:

  • "a" should not equalTo "b"
  • "a" shouldNotEqual "b"
  • "a" should_!= "b"
  • "a" must not equalTo "b"
  • "a" mustNotEqual "b"
  • "a" must_!= "b"