Thanks Peter,
I can understand there is no way Spock can figure out my intentions.
I tried 'every' as you suggested and it works. Only it does not
display the 'nested' debug info when a test fails, so for that reason
I will use assert explicitly.
My only worry is to forget about stating the explicit expectation.
Would it be an idea that Spock guards users in case you define expect
block but non assert would have been executed (both explicit/
implicit)?
On 7 jan, 12:17, Peter Niederwieser <
pnied...@gmail.com> wrote:
> Only top-level expressions are automatically considered assertions (anything else would cause troubles.) If you want to turn a nested expression into an assertion, you'll have to use `assert` explicitly. There is no way for Spock to automatically figure out your intent. Alternatively, you can use `every` instead of `each`.
>
> Cheers,
> Peter
>