2013-07-18 7 views
1

specs2으로 특정 테스트를 실행하려고하는데 거기에 사소한 문제가 하나 있습니다.specs2 특정 테스트 실행

import org.specs2._ 

class DemoSpec2 extends Specification { 
    def is = s2""" 

    This is a specification to check the 'Hello world' string 

    The 'Hello world' string should 
    contain 11 characters    ${Set11().e1}  ${tag("feature")} 
    start with 'Hello'     ${Set2().e2}   ${tag("abc")} 

             """ 

    case class Set11(){ def e1 = 1 must_== 1 } 
    case class Set2(){ def e2 = 1 must_== 1 } 

} 

${tag("feature")} 부분은 출력에 추가 라인을 만드는 : 이것은 내가 실행 해요 코드입니다. 그래서 그것은 다음과 같습니다 :

[info] The 'Hello world' string should 
[info]  + contain 11 characters 
[info]   
[info]  + start with 'Hello' 

나는 여분의 선을 원하지 않습니다. 내가 뭘 잘못하고있어?

답변

0

잘못된 것은 아니지만보고 버그입니다 (최신 2.2-SNAPSHOT에서 수정 됨). 그 동안 공백을 표시하지 않으면 문제가 해결됩니다.

import org.specs2._ 

class DemoSpec2 extends Specification { 
    def is = s2""" 

    This is a specification to check the 'Hello world' string 

    The 'Hello world' string should 
    contain 11 characters    ${Set11().e1}${("feature")} 
    start with 'Hello'     ${Set2().e2}${tag("abc")} 

            """ 
    case class Set11(){ def e1 = 1 must_== 1 } 
    case class Set2(){ def e2 = 1 must_== 1 } 
}