mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Added a SpekRunner.
This commit is contained in:
parent
0e7c94f458
commit
b2cdaf5150
2 changed files with 21 additions and 1 deletions
19
src/main/kotlin/com/beust/kobalt/internal/SpekRunner.kt
Normal file
19
src/main/kotlin/com/beust/kobalt/internal/SpekRunner.kt
Normal 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)
|
||||
|
||||
}
|
||||
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue