jtanistra / spock

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

Multiple Assignment in when: and anything in cleanup: #371

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem? If possible, provide source code and
stack trace.
1. use multiple assignment in when: 
2. put anything in cleanup:

What version of Spock and Groovy are you using?
spock-core v0.7-groovy-2.0
gmavenplus-plugin v1.2
groovy v2.3.3
java v1.7.0_60

Please provide any additional information below. You can also assign
labels.

import spock.lang.Specification
class ListReturnExample extends Specification {

    def "no worky" ()
    {
        when:
        def (String foo, int bar) = ["foo", 42] // problem line
        def baz = "baz"

        then:
        true

        cleanup:
        println "cleanup"
    }
}

Original issue reported on code.google.com by shawn.gardner@gmail.com on 18 Jul 2014 at 2:01

GoogleCodeExporter commented 8 years ago

Original comment by pnied...@gmail.com on 20 Jul 2014 at 9:30