2013-07-18 3 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 } 
} 
Смежные вопросы