2
import org.specs2.mutable.SpecWithJUnit
import org.specs2.specification.Scope
import org.specs2.execute.Failure
class MyTest extends SpecWithJUnit {
trait Context extends Scope
"myClass" should {
"work but not right now" in new Context {
Failure("test fails")
}
}
}
在這個Specs2的例子中,我如何將測試標記爲掛起直到修復(就像我使用SpecificationWithJUnit)?如何將測試標記爲pendingUntilFixed與SpecWithJUnit
是的,這工作。有沒有解釋這個問題的文件? – BritishDan
'PendingUntilFixed'是[there](https://etorreborre.github.io/specs2/guide/SPECS2-3.6.3/org.specs2.guide.PendingUntilFixedExamples.html)和「輕量級規格」在這裏描述[這裏]( https://etorreborre.github.io/specs2/guide/SPECS2-3.6.3/org.specs2.guide.LightweightSpecs.html)。另一方面,文檔沒有提到你必須在輕量級規格中添加PendingUntilFixed特性。 – Eric