1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Added a SpekRunner.

This commit is contained in:
Cedric Beust 2015-12-16 01:33:30 +04:00
parent 0e7c94f458
commit b2cdaf5150
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,19 @@
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)
}

View file

@ -17,9 +17,10 @@
<class-name>com.beust.kobalt.app.java.JavaBuildGenerator</class-name>
<class-name>com.beust.kobalt.app.kotlin.KotlinBuildGenerator</class-name>
<!-- These classes run TestNG or JUnit depending on which one the user picked -->
<!-- Test runners -->
<class-name>com.beust.kobalt.internal.JUnitRunner</class-name>
<class-name>com.beust.kobalt.internal.TestNgRunner</class-name>
<class-name>com.beust.kobalt.internal.SpekRunner</class-name>
</plugin-actors>
</kobalt-plugin>