1 Jun 2010 02:42
Re: Compile dependencies no longer on test runtime class path?
"gradle -C rebuild clean" doesn't make a difference. After experimenting some
more, I found that given the following build file, all test pass with 0.8,
but 42 out of 661 fail with 0.9-preview-1:
project(":spock-specs") {
dependencies {
compile project(":spock-core")
compile junit
testCompile easymock
testCompile jmock_junit4
testCompile jmock
testCompile mockito
testRuntime asm
testRuntime cglib
testRuntime objenesis
testRuntime h2database
}
}
As soon as I change at least one of the two compile dependencies to
testCompile, all tests pass even with 0.9-preview-1. Considering that
"junit" refers to JUnit 4.8.1, and that spock-core also declares a
dependency on JUnit 4.8.1, I suppose that if none of the two dependencies is
a "compile" dependency, Gradle 0.9-preview-1 puts an older version of JUnit
on the test runtime classpath, resulting in some tests to fail. Looking at
the failing tests, I'm pretty sure this is it.
Cheers,
Peter
(Continue reading)
RSS Feed