Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
K
kotlin-for-rubyists
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
What's new
5
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ivo Anjo
kotlin-for-rubyists
Commits
d5dbcdff
Verified
Commit
d5dbcdff
authored
Feb 20, 2019
by
Ivo Anjo
Browse files
Options
Downloads
Patches
Plain Diff
Add example setup for always running tests
+ pretty printing
+ stdout output
parent
0f6a352f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
testing-examples/build.gradle.kts
+9
-0
9 additions, 0 deletions
testing-examples/build.gradle.kts
testing-examples/src/test/kotlin/testing/examples/RubyOnIceTest.kt
+1
-0
1 addition, 0 deletions
...xamples/src/test/kotlin/testing/examples/RubyOnIceTest.kt
with
10 additions
and
0 deletions
testing-examples/build.gradle.kts
+
9
−
0
View file @
d5dbcdff
...
...
@@ -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
}
This diff is collapsed.
Click to expand it.
testing-examples/src/test/kotlin/testing/examples/RubyOnIceTest.kt
+
1
−
0
View file @
d5dbcdff
...
...
@@ -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!"
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment