28

テストケースの1つを「保留中」の状態にする必要があります。

テストの実行時に出力に表示できる、JUnit withのような、ある種のメッセージをそれに付けたいと思います@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
    }
  }
}

前もって感謝します!

4

1 に答える 1

43

個々の例として、次のものを使用できると思います。

class MySpec extends mutable.Specification {

  "cool MyClass feature" should {
    "which is broken unfortunately" in {
      failure
    }.pendingUntilFixed("message about the issue")
  }

}

あなたが望んでいるように、これを拡張して、仕様内のすべての例を同じメッセージで保留中としてマークする方法があるかどうかはわかりません。

于 2012-06-08T11:09:17.117 に答える