The following code example:
class MySpec extends spock.lang.Specification { def "My test"(int b) { given: def a = 1 expect: b > a where: b << 2..4 } }
produces the following compilation error: "where-blocks can only contain parameterizations (for example," salary <"[1000, 5000, 9000], salary = salary / 1000 ')"
but using a list instead of a range:
where: b << [2,3,4]
compiles and works fine as expected.
Can I also specify a range somehow?
source share