djcrankypants / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

Closure used as data value in where-block can't be called with method syntax #274

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
expect:
block() == 1

where:
block = { 1 }

groovy.lang.MissingMethodException: No signature of method: MySpec.block() is 
applicable for argument types: () values: []

Using block.call() or declaring the data variable as a method parameter solves 
the problem (even if the parameter is untyped).

Original issue reported on code.google.com by pnied...@gmail.com on 13 Oct 2012 at 11:07

GoogleCodeExporter commented 8 years ago
Possible fix at https://github.com/spockframework/spock/pull/31

Original comment by david.da...@simplicityitself.com on 28 Dec 2013 at 10:37

GoogleCodeExporter commented 8 years ago

Original comment by pnied...@gmail.com on 31 Dec 2013 at 2:41