문제

I have been having trouble getting the text of my specification to be output properly. I will use part of an example from the specs2 documenation:

class TaggedSpecification extends Specification {
  "this is some introductory text" >> {
    "and the first group of examples" >> {
      "example 1" in success
      "example 2" in success
    }
  }
}

I would expect this to show up like this in the terminal when I run it:

TaggedSpecification
this is some introductory text
  and the first group of examples
   + example 1
   + example 2

Instead, it is showing up like this:

TaggedSpecification
and the first group of examples
 + example 1
 + example 2

Why is the introductory text and indentation being eliminated? I thought that ">>" was the same as "should" but did not add the should text after the string. I have been unable to find anything in the documentation that clarifies this for me.

도움이 되었습니까?

해결책

You should update to the latest specs2 version, 2.3.4. Since the introduction of "interpolated specifications" in 2.0 there have been some various refactorings which have introduced display bugs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top