stoyicker
03/24/2017, 3:38 PMjk
03/24/2017, 4:08 PMraniejade
03/26/2017, 12:28 PMv1.1.0
is finally out! You can check out the release notes here https://github.com/JetBrains/spek/releases/tag/v1.1.0. We also synced the release to central, it should show up in a couple of hours. If you have any issues, please let us know.adambl4
03/26/2017, 12:41 PMcodeslubber
03/26/2017, 9:15 PMjackmiras
03/27/2017, 5:50 PMbuildscript {
repositories { mavenCentral() }
dependencies { classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M3' }
}
plugins {
id 'application'
id 'com.heroku.sdk.heroku-gradle' version '0.2.0'
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
}
apply plugin: 'org.junit.platform.gradle.plugin'
junitPlatform {
filters {
engines {
include 'spek'
}
}
}
group 'inteli-technology'
version '1.0'
mainClassName = "Routes"
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
main.java.srcDirs += 'src/main/kotlin/'
test.java.srcDirs += 'src/test/kotlin/'
}
repositories {
jcenter()
maven { url "<http://dl.bintray.com/jetbrains/spek>" }
}
def kotlin_version = '1.1.1'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.github.salomonbrys.kodein:kodein:3.2.0'
compile 'com.sparkjava:spark-core:2.5.5'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.4'
compile 'org.slf4j:slf4j-simple:1.7.21'
compile 'org.mongodb.morphia:morphia:1.3.2'
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile('org.jetbrains.spek:spek-api:1.1.0') {
exclude group: 'org.jetbrains.kotlin'
}
testRuntime('org.jetbrains.spek:spek-junit-platform-engine:1.1.0') {
exclude group: 'org.junit.platform'
exclude group: 'org.jetbrains.kotlin'
}
testCompile 'org.amshove.kluent:kluent:1.14'
}
But when I try to implement a test class like this:
object SimpleSpec: Spek({
describe("a calculator") {
val calculator = SampleCalculator()
on("addition") {
val sum = calculator.sum(2, 4)
it("should return the result of adding the first number to the second number") {
assertEquals(6, sum)
}
}
}
})
I'm unable to import Spek classes and methods.dstarcev
03/30/2017, 10:33 PMjunitPlatformTest
task. Only Spek tests are rundstarcev
03/30/2017, 10:37 PMdstarcev
03/30/2017, 10:48 PMorg.junit.platform.gradle.plugin
from the build scriptjdiaz
04/02/2017, 10:04 PMjk
04/03/2017, 12:00 AMjk
04/03/2017, 12:01 AMraniejade
04/03/2017, 3:57 AMjunitPlatform {
platformVersion '1.0.0-M3'
}
raniejade
04/03/2017, 3:58 AM1.0.0-M4
was recently released, I suspect some breaking changes to the API.jdiaz
04/03/2017, 6:23 PMjk
04/03/2017, 7:59 PMM3
fixed it for me:
junitPlatform {
platformVersion '1.0.0-M3'
}
jdiaz
04/03/2017, 8:00 PMjk
04/03/2017, 8:02 PMjdiaz
04/03/2017, 8:04 PMjdiaz
04/03/2017, 8:05 PMjdiaz
04/03/2017, 8:05 PMjk
04/03/2017, 8:08 PMjdiaz
04/03/2017, 8:08 PMjdiaz
04/03/2017, 8:09 PMjdiaz
04/03/2017, 8:09 PMjk
04/03/2017, 8:10 PMjunitPlatform {
platformVersion "${junitPlatformVersion}"
filters {
engines {
include 'spek'
}
}
}
jdiaz
04/03/2017, 8:11 PMjdiaz
04/03/2017, 8:11 PM