Deprecate should_not raise_error in MSpec and replaces usages in ruby/spec
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 622
- Forks
- 402
- Avg merge
- 14h 51m
- Merged PRs (30d)
- 6
Description
See https://github.com/ruby/spec/pull/753/files#r376792963
should_not raise_error is the same as testing nothing.
Each example already implicitly test no exception is raised.
There might be a few legit cases, but I would expect the vast majority could be removed and replaced with useful expectations actually testing it works as expected.
Currently there are about 176 should_not raise_error in ruby/spec.
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
Review the referenced ruby/spec pull request discussion and search the repository for the roughly 176 should_not raise_error usages. Separate legitimate exception checks from cases that only verify no exception, then replace or remove the latter with useful expectations. Done means the unnecessary usages are addressed and the MSpec behavior is deprecated consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100