> you can do whatever feels right for a given case
Too bad you can't use whatever specification language feels right. Spock only provides Apache Groovy, with its tacky syntax hacks like long strings for function names, block labels having special meanings based on their name, or the OR and LOR operators being used for drawing tables in the code. In the past when software has provided Groovy for writing specs, they eventually provide an alternative when Groovy's shortfalls become obvious, e.g. Kotlin for Gradle [1], or the Declarative Pipeline Syntax [2] for Jenkins.
[1]: https://docs.gradle.org/5.0/userguide/kotlin_dsl.html
[2]: https://jenkins.io/blog/2016/12/19/declarative-pipeline-beta
> Groovy, with its tacky syntax hacks like long strings for function names
Actually, Kotlin does that too. I think it is even encouraged for writing tests.
Re:The Tragedy of Given-When-Then
by dmitryminkovsky on Tuesday April 16, 2019 @08:06PM
(#19678484)
Interesting, thank you. Not sure why the string function names, named blocks etc are bad. I enjoy them. Looking forward to reading about this Kotlin DSL though... I like Groovy for testing (your tests are more likely to compile even if they're broken) but it could be better.
[0]: http://spockframework.org/
[1]: http://spockframework.org/spock/docs/1.3/spock_primer.html#_...
[2]: http://spockframework.org/spock/docs/1.3/data_driven_testing...
[3]: https://twitter.com/dminkovsky/status/1116727735399976966