私は同様の仕様のように見えるものを持っています:
def "my spec"(Record record) {
given:
Something something = getSomething()
and:
otherThing = getOtherThing()
doFlow(something, record)
if (record.someType = Types.SOME_SPECIFIC_TYPE) {
doFlow(something, record)
}
}
def doFlow(Something something, Record record) {
when:
//code
then:
//asserts
when:
//code
and:
//mode code
then:
//code
}
ただし、実行時に次のようになりますgroovy.lang.MissingMethodException: No signature of method doFlow() is applicable for arguments Something, Record values: [given values]
。