Skip to content

Commit

Permalink
Adding class to main in 'a-tests' breaks reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwestor committed Feb 18, 2015
1 parent ca7abc8 commit 0eeeb59
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package hello

class BaseTest {
def beforeTest() = {
println("Running test!")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 0eeeb59

Please sign in to comment.