mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Better SpekRunner.
This commit is contained in:
parent
156455be98
commit
b3bffad341
2 changed files with 6 additions and 18 deletions
|
@ -5,15 +5,16 @@ import com.beust.kobalt.api.IClasspathDependency
|
|||
import com.beust.kobalt.api.KobaltContext
|
||||
import com.beust.kobalt.api.Project
|
||||
|
||||
public class JUnitRunner() : GenericTestRunner() {
|
||||
open public class JUnitRunner() : GenericTestRunner() {
|
||||
|
||||
override val mainClass = "org.junit.runner.JUnitCore"
|
||||
|
||||
open val dependencyName = "junit"
|
||||
|
||||
override fun affinity(project: Project, context: KobaltContext) =
|
||||
if (project.testDependencies.any { it.id.contains("junit")}) IAffinity.DEFAULT_POSITIVE_AFFINITY
|
||||
if (project.testDependencies.any { it.id.contains(dependencyName)}) IAffinity.DEFAULT_POSITIVE_AFFINITY
|
||||
else 0
|
||||
|
||||
override fun args(project: Project, classpath: List<IClasspathDependency>) = findTestClasses(project, classpath)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
package com.beust.kobalt.internal
|
||||
|
||||
import com.beust.kobalt.api.IAffinity
|
||||
import com.beust.kobalt.api.IClasspathDependency
|
||||
import com.beust.kobalt.api.KobaltContext
|
||||
import com.beust.kobalt.api.Project
|
||||
|
||||
public class SpekRunner() : GenericTestRunner() {
|
||||
|
||||
override val mainClass = "org.junit.runner.JUnitCore"
|
||||
|
||||
override fun affinity(project: Project, context: KobaltContext) =
|
||||
if (project.testDependencies.any { it.id.contains("org.jetbrains.spek")})IAffinity.DEFAULT_POSITIVE_AFFINITY
|
||||
else 0
|
||||
|
||||
override fun args(project: Project, classpath: List<IClasspathDependency>) = findTestClasses(project, classpath)
|
||||
|
||||
public class SpekRunner() : JUnitRunner() {
|
||||
override val dependencyName = "org.jetbrains.spek"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue