Tuesday, April 26, 2016

Global unroll

Spock is a great tool, but my coleague Marcin Zajączkowski invented a way to make it perfect. He published his lib  to unroll all tests by default. This is very nice feature, because this is probably the desired way of working with parametrized tests.
Just add this lib to testCompile:
info.solidsoft.spock:spock-global-unroll:0.5.0
now you can remove all @Unroll from your tests.

Simple pull request made by author:
https://github.com/piotrpietrzak/aprcalc/pull/2/files

1 comment:

  1. I did it to encourage you to write more tests, including parameterized tests :)

    In the large project the impact (removed lines) is more visible:
    https://github.com/4finance/micro-infra-spring/pull/566/files

    ReplyDelete