Skip to content

Commit

Permalink
⬆️ (Core): Switch to Spek2
Browse files Browse the repository at this point in the history
  • Loading branch information
xgouchet committed Dec 2, 2019
1 parent b146588 commit 2a567a1
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 53 deletions.
7 changes: 3 additions & 4 deletions buildSrc/src/main/kotlin/fr/xgouchet/buildsrc/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object Dependencies {
const val JUnitPlatform = "1.5.2"
const val JUnitVintage = "5.5.2"

const val Spek = "1.2.1"
const val Spek2 = "2.0.8"
const val AssertJ = "0.2.1"
const val MockitoKotlin = "2.1.0"
const val Jacoco = "0.8.4"
Expand All @@ -37,9 +37,8 @@ object Dependencies {
const val JUnit4 = "junit:junit:${Versions.JUnit4}"

@JvmField val Spek = arrayOf(
"org.jetbrains.spek:spek-api:${Versions.Spek}",
"org.jetbrains.spek:spek-subject-extension:${Versions.Spek}",
"org.jetbrains.spek:spek-junit-platform-engine:${Versions.Spek}",
"org.spekframework.spek2:spek-dsl-jvm:${Versions.Spek2}",
"org.spekframework.spek2:spek-runner-junit5:${Versions.Spek2}",
"org.jetbrains.kotlin:kotlin-reflect:${Versions.Kotlin}"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.gradle.api.tasks.testing.Test
fun Project.junitConfig() {
tasks.withType(Test::class.java) {
useJUnitPlatform {
includeEngines("spek", "junit-jupiter", "junit-vintage")
includeEngines("spek2", "junit-jupiter", "junit-vintage")
}
}
}
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeBooleanSpek.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package fr.xgouchet.elmyr

import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeBooleanSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeCharSpek.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeCharSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeCollectionSpek.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.KotlinAssertions.assertThat as assertThatK
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeCollectionSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeDelegateSpek.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ import fr.xgouchet.elmyr.kotlin.booleanForgery
import fr.xgouchet.elmyr.kotlin.factoryForgery
import fr.xgouchet.elmyr.kotlin.nullableForgery
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeDelegateSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeDoubleSpek.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeDoubleSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeFactorySpek.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import fr.xgouchet.elmyr.dummy.Bar
import fr.xgouchet.elmyr.dummy.Foo
import fr.xgouchet.elmyr.dummy.Food
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeFactorySpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeFloatSpek.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeFloatSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeIntSpek.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeIntSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeLongSpek.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeLongSpek : Spek({

Expand Down
6 changes: 2 additions & 4 deletions core/src/test/kotlin/fr/xgouchet/elmyr/ForgeStringSpek.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package fr.xgouchet.elmyr

import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class ForgeStringSpek : Spek({

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package fr.xgouchet.elmyr.regex
import fr.xgouchet.elmyr.Forge
import fr.xgouchet.elmyr.throws
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

class RegexParserSpek : Spek({
describe("A regex parser") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package fr.xgouchet.elmyr.regex.node

import fr.xgouchet.elmyr.Forge
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.context
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

/**
* @author Xavier F. Gouchet
Expand Down

0 comments on commit 2a567a1

Please sign in to comment.