How can I get nested tests to ouput text properly in specs2?

175 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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.