Я работаю: spockVersion = 1.3- groovy -2.5
Intellij запускает тесты Спока с использованием шаблона Junit. Я нашел решение здесь: Объединение тестов Spock 1.2 и Junit 5 Решение было добавить следующее в мой build.gradle:
dependencies {
implementation "org.junit.jupiter:junit-jupiter-api:5.6.1"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.6.1"
}
test { // only needed if doing 'gradle test'
useJUnitPlatform()
}
Я выполняю этот код в Intellij / Idea 2019,3, с использованием
------------------------------------------------------------
Gradle 6.2.2
------------------------------------------------------------
Build time: 2020-03-04 08:49:31 UTC
Revision: 7d0bf6dcb46c143bcc3b7a0fa40a8e5ca28e5856
Kotlin: 1.3.61
Groovy: 2.5.8
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 1.8.0_152 (Azul Systems, Inc. 25.152-b16)
OS: Linux 4.15.0-52-generic amd64
Linux Mint 19 Tara