From e76905e3a1034e6f724566aeb985621347ff43bc Mon Sep 17 00:00:00 2001 From: Sterling Greene Date: Tue, 4 Dec 2018 15:39:41 -0500 Subject: [PATCH] Workaround for https://github.com/spockframework/spock/issues/475 --- .../testing/detection/DefaultTestClassScannerTest.groovy | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/subprojects/testing-jvm/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy b/subprojects/testing-jvm/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy index ea74f3c99085..5481c1fc756b 100755 --- a/subprojects/testing-jvm/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy +++ b/subprojects/testing-jvm/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy @@ -46,17 +46,16 @@ class DefaultTestClassScannerTest extends Specification { then: 1 * detector.startDetection(processor) then: + 1 * detector.processTestClass({ it.file.is(class1.file) && it.relativePath.is(class1.relativePath) }) + then: + 1 * detector.processTestClass({ it.file.is(class2.file) && it.relativePath.is(class2.relativePath) }) + then: 1 * files.visit(_) >> { args -> FileVisitor visitor = args[0] assert visitor visitor.visitFile(class1) visitor.visitFile(class2) } - then: - 1 * detector.processTestClass({ it.file.is(class1.file) && it.relativePath.is(class1.relativePath) }) - then: - 1 * detector.processTestClass({ it.file.is(class2.file) && it.relativePath.is(class2.relativePath) }) - 0 * _._ }