Skip to content

[Bug] Code constraint argument verification fails when a closure is used inside #994

Description

@mutyonok

Issue description

After upgrade to spock 1.3-groovy-2.5 and changing argument verification code constraint blocks according to docs (a check per line without assert or &&), tests with closures inside constraint blocks are failing.

How to reproduce

  • add mock interaction check with argument code constraint
  • add a check with a closure inside that code constraint block
    Result:
  • invocation is not found (see gist output)

Link to a gist or similar (optional)

https://gist.github.com/mutyonok/609373367161a0281a494863f4778a2a

Additional Environment information

Java/JDK

1.8.0_201

Groovy version

2.5.3

Build tool version

Gradle

5.3.1

Operating System

macOS X Mojave

IDE

IntelliJ IDEA 2019.1 (Ultimate Edition)
Build #IU-191.6183.87, built on March 27, 2019
JRE: 1.8.0_152-release-991-b1 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4

Build-tool dependencies used

Gradle/Grails

testCompile "org.spockframework:spock-core:1.3-groovy-2.5"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions