diff --git a/src/test/groovy/org/scoverage/SeparateTestsAcceptanceTest.groovy b/src/test/groovy/org/scoverage/SeparateTestsAcceptanceTest.groovy index d900809..f9b7158 100644 --- a/src/test/groovy/org/scoverage/SeparateTestsAcceptanceTest.groovy +++ b/src/test/groovy/org/scoverage/SeparateTestsAcceptanceTest.groovy @@ -23,6 +23,10 @@ class SeparateTestsAcceptanceTest extends AcceptanceTestUtils { def testsIndexHtml = new File(reportDir(testsSubprojectDir), 'index.html') checkFile('an index HTML file', testsIndexHtml, false) + // ... and 'Hello.scala' is present there ... + def helloHtml = new File(reportDir(subprojectDir), 'src/main/scala/hello/Hello.scala.html') + checkFile('Hello.scala html file', helloHtml, true) + // ... and both statement and branch coverage is 100% def branchCoverage = coverage(reportDir(subprojectDir), CoverageType.Branch) def statementCoverage = coverage(reportDir(subprojectDir), CoverageType.Statement) diff --git a/src/test/separate-tests/a-tests/src/main/scala/hello/BaseTest.scala b/src/test/separate-tests/a-tests/src/main/scala/hello/BaseTest.scala new file mode 100644 index 0000000..12d82ae --- /dev/null +++ b/src/test/separate-tests/a-tests/src/main/scala/hello/BaseTest.scala @@ -0,0 +1,7 @@ +package hello + +class BaseTest { + def beforeTest() = { + println("Running test!") + } +} \ No newline at end of file diff --git a/src/test/separate-tests/a-tests/src/test/scala/hello/HelloTest.scala b/src/test/separate-tests/a-tests/src/test/scala/hello/HelloTest.scala index 4e9c871..1c7df23 100644 --- a/src/test/separate-tests/a-tests/src/test/scala/hello/HelloTest.scala +++ b/src/test/separate-tests/a-tests/src/test/scala/hello/HelloTest.scala @@ -3,9 +3,10 @@ package hello import org.junit.Test import org.junit.Assert.assertEquals -class HelloTest { +class HelloTest extends BaseTest { @Test def testText() { + beforeTest() assertEquals("Hello World", new Hello().text) }