26
我需要将我的测试用例之一放入“待处理”状态。Specs2:忽略指定消息?
我想要在运行测试时在输出上显示某些消息,比如JUnit与@Ignore("Pending: issue #1234 needs to be fixed")
。
是否有与Specs2的等价物?
class MySpec extends mutable.Specification {
args(skipAll = true) // Can I include a message here in the output somehow?
"cool MyClass feature" should {
"which is broken unfortunately" in {
failure
}
}
}
在此先感谢!
你也可以在你的例子中使用'Pending(“message”)'而不是'failure'(假设之前没有调用'FailureException',在这种情况下'pendingUntilFixed是最好的方法) – Eric
Thx for帮助,也是@Eric替代方法。 – rlegendi
我认为答案实际上是错误的 - 不编译。 .pendingUntilFixed(“关于该问题的消息”)必须移动一行。 –