We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related, (but not the same as) #1256
When testing using a GroovyMock/GroovyStub/GroovySpy - isProperty() style getters are not respected, and only getProperty() is used.
isProperty()
getProperty()
Tested under org.spockframework:spock-core:1.3-groovy-2.4
org.spockframework:spock-core:1.3-groovy-2.4
To reproduce:
import spock.lang.Specification class TesterSpec extends Specification { static class Tester { boolean isEnabled() { return true } } def 'Works'() { given: Tester x = new Tester() expect: x.enabled == true } def 'GroovySpy does not work Test'() { given: Tester x = GroovySpy(Tester) expect: x.enabled == true } def 'GroovyMock does not work either Test'(){ given: Tester x = GroovyMock(Tester) when: x.enabled then: 1 * x.isEnabled() >> true } def 'Mock works though Test'(){ given: Tester x = Mock(Tester) when: x.enabled then: 1 * x.isEnabled() >> true } }
The text was updated successfully, but these errors were encountered:
Like I said in the other issue, the same thing happens in Spock 2.0-M4 and in the master branch after #1256 was merged in already.
Sorry, something went wrong.
Fix handling of is as getter for boolean properties on GroovyMocks
is
00cbf5f
fixes #1270
Fix handling of is as getter for boolean properties on GroovyMocks (#…
4e2674a
…1302) fixes #1270
Successfully merging a pull request may close this issue.
Related, (but not the same as) #1256
When testing using a GroovyMock/GroovyStub/GroovySpy -
isProperty()
style getters are not respected, and onlygetProperty()
is used.Tested under
org.spockframework:spock-core:1.3-groovy-2.4
To reproduce:
The text was updated successfully, but these errors were encountered: