3 ms·
This is why I like Spock [0]. You can go G/W/T/, W/T, T, or Expect [1]. It's billed as "multi-paradigm" which really just means you can do whatever feels right
by dmitryminkovsky 8y ago
This is why I like Spock [0]. You can go G/W/T/, W/T, T, or Expect [1]. It's billed as "multi-paradigm" which really just means you can do whatever feels right for a given case. Also its data table feature is wonderful [2][3].
[0]: http://spockframework.org/ http://spockframework.org/
[1]: http://spockframework.org/spock/docs/1.3/spock_primer.html#_blocks http://spockframework.org/spock/docs/1.3/spock_primer.html#_...
[2]: http://spockframework.org/spock/docs/1.3/data_driven_testing.html http://spockframework.org/spock/docs/1.3/data_driven_testing...
[3]: https://twitter.com/dminkovsky/status/1116727735399976966 https://twitter.com/dminkovsky/status/1116727735399976966
- vorg 8y ago> 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 https://docs.gradle.org/5.0/userguide/kotlin_dsl.html [2]: https://jenkins.io/blog/2016/12/19/declarative-pipeline-beta https://jenkins.io/blog/2016/12/19/declarative-pipeline-beta
- dmitryminkovsky 8y agoInteresting, 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.
- zmmmmm 8y ago> 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.