Skip to content

Commit f7a6863

Browse files
committed
fix temporary folder
1 parent 8336b05 commit f7a6863

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/test/groovy/com/github/hauner/openapi/json/processor/JsonProcessorSpec.groovy

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@ package com.github.hauner.openapi.json.processor
1818

1919
import com.github.difflib.DiffUtils
2020
import com.github.difflib.UnifiedDiffUtils
21-
import org.junit.Rule
22-
import org.junit.rules.TemporaryFolder
2321
import spock.lang.Specification
22+
import spock.lang.TempDir
2423

2524
class JsonProcessorSpec extends Specification {
2625

27-
@Rule
28-
public TemporaryFolder folder = new TemporaryFolder()
26+
@TempDir
27+
public File folder
2928

3029
void "run json processor" () {
3130
def apiPath = ['.', 'src', 'test', 'resources', 'openapi.yaml'].join(File.separator)
3231
def expJson = ['.', 'src', 'test', 'resources', 'openapi.json'].join(File.separator)
33-
def targetDir = [folder.root.absolutePath].join(File.separator)
32+
def targetDir = [folder.absolutePath].join(File.separator)
3433
def targetPath = [targetDir, 'openapi.json'].join(File.separator)
3534

3635
def options = [
@@ -69,5 +68,4 @@ class JsonProcessorSpec extends Specification {
6968
println it
7069
}
7170
}
72-
7371
}

0 commit comments

Comments
 (0)