score:0

Accepted answer

You are not doing anything wrong, this is a reporting bug (fixed in the latest 2.2-SNAPSHOT). In the meantime things should be ok if you suppress spaces:

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 }
}

Related Query

More Query from same tag