The following example code:
class MySpec extends spock.lang.Specification {
def "My test"(int b) {
given:
def a = 1
expect:
b > a
where:
b << 2..4
}
}
throws the following compilation error: "where-blocks may only contain parameterizations (e.g. 'salary << [1000, 5000, 9000]; salaryk = salary / 1000')"
but using a List instead of a Range:
where:
b << [2,3,4]
compiles and runs fine as expected.
Could I also specify a Range somehow?