spockframework / spockframework/spock
thrown() that takes an exception instance
Open
Nobody has claimed this yet.
Module-Core
Type-Defect
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
Originally reported on Google Code with ID 275
It would be nice to have a following shortcut:
then:
def ex = thrown(Exception)
ex == expectedException
//shortcut:
then:
thrown(expectedException)
Reported by szczepiq on 2012-10-16 09:35:40
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
Start by locating the existing thrown(Exception) entry point and the tests covering exception assertions. Compare the requested thrown(expectedException) call with the current behavior, then update the relevant tests and implementation so the instance-based shortcut is supported and its equality behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100