Scala (v2.9.1) で specs2 (v1.8.2) を使用して受け入れテストを作成しています。http://etorreborre.github.com/specs2/guide/org.specs2.guide.SpecStructure.html#Contextsの例に従って、次の仕様とコンテキスト ケース クラスがあります。
import org.specs2._
class testspec extends SpecificationWithJUnit { def is =
"test should" ^
"run a test in a context" ! context().e1
}
case class context() {
def e1 = 1 must beEqualTo(1)
}
コンパイラ エラーが発生します。
エラー: 値は Int def e1 = 1 のメンバーではない必要があります beEqualTo(1)
コンテキストケースクラスをコンパイルするとき。
明らかに、私は specs2 (および Scala) が初めてです。適切なドキュメントへの参照は大歓迎です。