2014-04-28 4 views
1

나는 간단한 specs2 주어진 때 다음 테스트 케이스에서 (A simple Scala Given/When/Then style specification failed). 코드가 컴파일되지 않습니다. 왜 그런지 모르겠다. 코드 :Specs2 그때 주어진 간단한 테스트가 실패했습니다

class Specs2Spec extends Specification { def is = 
    "addition"^
    "given first number: ${1}"  ^number1^
    "when add another number: ${2}" ^number2^
    "Then the result is: ${3}"  ^result^
    end 
    lazy val number1: Given[Int] = (_: String).toInt 
    lazy val number2: When[Int, (Int, Int)] = (n1: Int) => (s: String) => (n1, s.toInt) 
    lazy val result: Then[(Int, Int)] = (n: (Int, Int)) => (s: String) => (n._1 + n._2) must_== s.toInt 
} 

오류 : 오류 : 대안 (8, 39)에있어서 과부하 값^ (a : org.specs2.main.Arguments) org.specs2.specification.Fragments. .......

미리 감사드립니다.

답변

1

구문이 바뀌 었으므로 GWT 특성을 사용해야한다고 생각합니다.

documentation을 살펴보십시오.