diff --git a/build.gradle b/build.gradle index 4deb0d1..681b3f7 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,7 @@ group = 'nu.studer' version = '3.0.3-DEV' dependencies { - testImplementation 'org.spockframework:spock-core:2.0-M4-groovy-2.5' - testImplementation 'org.spockframework:spock-junit4:2.0-M4-groovy-2.5' + testImplementation 'org.spockframework:spock-core:2.0-groovy-2.5' } java { diff --git a/src/test/groovy/nu/studer/gradle/rocker/BaseFuncTest.groovy b/src/test/groovy/nu/studer/gradle/rocker/BaseFuncTest.groovy index 3db2d0e..e7a7577 100644 --- a/src/test/groovy/nu/studer/gradle/rocker/BaseFuncTest.groovy +++ b/src/test/groovy/nu/studer/gradle/rocker/BaseFuncTest.groovy @@ -3,10 +3,9 @@ package nu.studer.gradle.rocker import org.gradle.testkit.runner.BuildResult import org.gradle.testkit.runner.GradleRunner import org.gradle.util.GradleVersion -import org.junit.Rule -import org.junit.rules.TemporaryFolder import spock.lang.Shared import spock.lang.Specification +import spock.lang.TempDir import java.lang.management.ManagementFactory @@ -24,15 +23,15 @@ abstract class BaseFuncTest extends Specification { } } - @Rule - TemporaryFolder tempDir = new TemporaryFolder() + @TempDir + File tempDir File workspaceDir GradleVersion gradleVersion void setup() { def testFolder = specificationContext.currentIteration.name.replace(':', '.').replace('\'', '') - workspaceDir = new File(tempDir.root, testFolder) + workspaceDir = new File(tempDir, testFolder) gradleVersion = determineGradleVersion() def localBuildCacheDirectory = new File(workspaceDir, 'local-cache') diff --git a/src/test/groovy/nu/studer/gradle/rocker/RockerFuncTest.groovy b/src/test/groovy/nu/studer/gradle/rocker/RockerFuncTest.groovy index e65e226..8300bb4 100644 --- a/src/test/groovy/nu/studer/gradle/rocker/RockerFuncTest.groovy +++ b/src/test/groovy/nu/studer/gradle/rocker/RockerFuncTest.groovy @@ -60,7 +60,7 @@ rocker { void "can invoke rocker task derived from all-default configuration DSL with Gradle configuration cache enabled"() { given: - gradleVersion = GradleVersion.version('6.8.2') + gradleVersion = GradleVersion.version('6.9') template('src/rocker/foo/Example.rocker.html') and: