Noisy output when running tests :(
Open
Nobody has claimed this yet.
contributor-dx
- Dominant language
- Ruby
- Stars
- 1.2k
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
When running tests, there's a lot of noisy output. This is caused by the usage of $stderr.puts inside classes.
There are plenty of ways to fix that:
- Surround function calls that uses
$stderr.putswith acapture_io. The last comes withminitest - Create a dependency injections that we could manage
$stderr.puts - Stubbing
$stderrfor tests - ...
I like the dependency injection. Any other suggestions ?
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 classes that call $stderr.puts and review the existing Minitest setup, especially capture_io. Compare the proposed capture_io, dependency-injection, and $stderr-stubbing approaches before choosing one. Done means the tests no longer produce the reported noisy output and the relevant test coverage still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100