This repository contains my code for testing with the wonderful Spock Framework.
I used Kotlin instead of Java as the language for the production code. This means that the tests are written in a relatively unsafe language (Groovy) and the implementation in one of the most type safe languages on the JVM 😉.
- Spock forces you to use given, when, then making the tests very descriptive
- Spock makes mocking much less tedious
- Spock supports even Spring Boot
- mixing two languages (such as Groovy and Kotlin) might be confusing.
- some intentions in IntelliJ (such as create Class) don't work currently in a polyglot environment.
- for now, Spock does not support JUnit5 natively (they are working on that & you can still use the vintage engine).
The Project consists of two cases:
- Greeter. A glorified "Hello, World" where I demonstrated some features of Spock.
- Raindrops. Our (successful) attempt to implement the Raindrops Kata using Spock and Kotlin in a mob.