From fdd18a3573e94e9f00224cc75f0c793f0fec86c6 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 13 Jul 2016 02:45:08 -0800 Subject: [PATCH] Exclude $ classes from being run by Unit. Fixes https://github.com/cbeust/kobalt/issues/251. --- .../main/kotlin/com/beust/kobalt/internal/GenericRunner.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt index c3311f5f..43fc38b4 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt @@ -34,9 +34,9 @@ abstract class GenericTestRunner: ITestRunnerContributor { } val testClasses = IFileSpec.GlobSpec(toClassPaths(testConfig.testIncludes)) - .toFiles(project.directory, path, testConfig.testExcludes.map { - Glob(it) - }).map { + .toFiles(project.directory, path, testConfig.testExcludes.map { Glob(it) }) + .filter { ! it.path.contains('$') } + .map { File(KFiles.joinDir(project.directory, testClassDir, it.path)) } val result = testClasses.map {