It would be nice if parameters defined with `<<` could reference previous
definitions. Then one could do things like this to make one's tests more robust
to refactoring:
where:
IDENTIFIER = 'fooId'
snippet << ["""<label for="${IDENTIFIER}"/><input type="text" id="${IDENTIFIER}" />"""]
However, this is not currently possible:
- Parameters defined with `=` can reference ones defined previously
- Parameters defined with `<<` or in table format cannot reference ones defined
previously, not even those defined with `=`
Example:
https://github.com/emlun/spock-parameter-cross-reference-fail/blob/master/src/te
st/groovy/Foo.groovy
It would also be nice if parameters in table format could reference other
parameters as well, but I suspect its usefulness is more limited.
Original issue reported on code.google.com by lundberg...@gmail.com on 11 Feb 2015 at 11:37
Original issue reported on code.google.com by
lundberg...@gmail.com
on 11 Feb 2015 at 11:37