Open jevgarcia22 opened 3 years ago
Is detect
a variable in a Shared Library that will be present on your Jenkins master?
I think the disconnect here is .call("script")
- try plain old
getPipelineMock('detect.changedFiles')('script') >> "test"
It's unfortunate, but the Groovy syntactic sugar of ".call()
is implicitly the same as just attaching those parentheses to an object" doesn't work every time with the shenanigans we had to go through to get implicit, automatic mocking working in jenkins-spock
.
code under test: lint.groovy
I'm trying to mock execution of detect.changedFiles() like this:
executions fail with:
Is it possible to mock interactions with methods in external libraries?