Skip to content
Snippets Groups Projects
Verified Commit d5dbcdff authored by Ivo Anjo's avatar Ivo Anjo
Browse files

Add example setup for always running tests :repeat: + pretty printing :nail_care: + stdout output :desktop:

parent 0f6a352f
Branches
No related tags found
No related merge requests found
......@@ -8,6 +8,9 @@ plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
id("org.jetbrains.kotlin.jvm").version("1.3.20")
// Pretty logging during test runs: https://github.com/radarsh/gradle-test-logger-plugin
id("com.adarshr.test-logger").version("1.6.0")
// Apply the application plugin to add support for building a CLI application.
application
}
......@@ -55,4 +58,10 @@ tasks.withType<Test> {
useJUnitPlatform {
includeEngines("spek2")
}
// always runs tests
outputs.upToDateWhen { false }
// Show stdout/stderr in console (if using test-logger plugin)
testlogger.showStandardStreams = true
}
......@@ -28,6 +28,7 @@ object RubyOnIceTest : Spek({
val user = mock<User> { on { name() } doReturn(name) }
it("greets only the supplied user") {
println("Test println from inside testcase")
assertThat(subject.hello(user)).isEqualTo("Hello there, Ivo!")
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment