Remove Spek add Kotest

This commit is contained in:
Edwin Jakobs
2023-11-18 22:36:35 +01:00
parent 2d3ae83729
commit 5012f8fb14
34 changed files with 255 additions and 309 deletions

View File

@@ -10,7 +10,6 @@ tasks.withType<KotlinCompile> {
tasks.test {
useJUnitPlatform {
includeEngines("spek2")
}
}
@@ -25,7 +24,7 @@ dependencies {
implementation(libs.kotlin.scriptingJSR223)
implementation(libs.kotlin.coroutines)
testImplementation(libs.kluent)
testImplementation(libs.spek.dsl)
testRuntimeOnly(libs.spek.junit5)
testImplementation(libs.kotest.runner)
testImplementation(libs.kotest.assertions)
testRuntimeOnly(libs.kotlin.reflect)
}

View File

@@ -1,18 +1,16 @@
import org.amshove.kluent.`should be equal to`
import io.kotest.core.spec.style.DescribeSpec
import io.kotest.matchers.equals.shouldBeEqual
import org.openrndr.extra.olive.ScriptObjectLoader
import org.openrndr.extra.olive.loadFromScript
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
object TestLoadScript : Spek({
class TestLoadScript : DescribeSpec({
describe("some script") {
val loader = ScriptObjectLoader()
val loader = ScriptObjectLoader()
val number = loader.load<Int>("5")
it("should evaluate properly") {
number `should be equal to` 5
number shouldBeEqual 5
}
}
})

View File

@@ -1,15 +1,14 @@
import org.amshove.kluent.`should be equal to`
import io.kotest.core.spec.style.DescribeSpec
import io.kotest.matchers.equals.shouldBeEqual
import org.openrndr.extra.olive.loadFromScriptContentsKSH
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
object TestLoadScriptKSH : Spek({
class TestLoadScriptKSH : DescribeSpec({
describe("some script") {
val number = loadFromScriptContentsKSH<Int>("5")
it("should evaluate properly") {
number `should be equal to` 5
number shouldBeEqual 5
}
}
})