This is very perplexing. If I remove the 3rd example in the code below, JUnit runner in Eclipse shows the test results in the usual hierarchy. As soon as the third example is added, all 3 tests drop out into Unrooted Tests category.
import org.junit.runner.RunWith
import org.specs2.mutable.Specification
import org.specs2.specification.AllExpectations
@RunWith(classOf[org.specs2.runner.JUnitRunner])
class ThreeTests extends Specification with AllExpectations {
"My Repository" should {
"do x" in {
1 === 1
}
"do y" in {
1 === 1
}
"do z" in {
1 === 1
}
}
}
You should use the latest specs2 version: "org.specs2" %% "specs2" % "2.3.12"