spockframework / spockframework/spock
Unmatched invocation description to include types
Open
Nobody has claimed this yet.
Module-Core
Type-NewFeature
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
Originally reported on Google Code with ID 377
On some occasions I'll have a mock not match its interaction because of the types. One
problem is diagnosing it, because the output looks identical:
Too few invocations for:
1 * client.shareImages(['ami-12345de'], '12345678') (0 invocations)
Unmatched invocations (ordered by similarity):
1 * client.shareImages(['ami-12345de'], '12345678')
Via pniederw@gmail.com: We should be able to come up with a better error message here.
Reported by quidryan on 2014-10-13 04:29:23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by tracing Spock's unmatched invocation reporting and how it compares invocation argument types; reproduce the shown mock mismatch. Done means the diagnostic distinguishes type-based mismatches while preserving the existing invocation details, with regression coverage for the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100