Skip to content

Migrating to Spock 2, some errors happen when using parameter named build #1200

@etiennestuder

Description

@etiennestuder

Issue description

When migrating to Spock 2, some tests previously green started failing. As crazy as it sounds, it turned out that renaming the parameters named build holding a Mock to some other name made the tests green again.

How to reproduce

Link to a gist or similar (optional)

See this code change which turns the red tests back into green tests:
etiennestuder/teamcity-build-scan-plugin@75bfa6d#diff-9dac7f911ea3895bc8e7af5798850b91R26

Additional Environment information


Gradle 6.6-rc-2

Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 13.0.2 (Oracle Corporation 13.0.2+8)
OS: Mac OS X 10.15.6 x86_64

Java/JDK

openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

Build-tool dependencies used

Gradle/Grails

dependencies {
testImplementation 'org.spockframework:spock-core:2.0-M3-groovy-2.5'
testImplementation 'org.spockframework:spock-junit4:2.0-M3-groovy-2.5'
}

test {
useJUnitPlatform()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions