I’ve been working on a gem in my spare time for code coverage and one of its goals is to output coverage reports to stdout. The hope is that while running something like guard for RSpec, also having test coverage output during the red-green-refactor cycling will be useful. What I didn’t realize beforehand is that output is fully testable within RSpec. Here’s an example of ensuring a proper message is sent via
"The output matcher provides a way to assert that the block has emitted content to either $stdout or $stderr."
This is accomplishing using RSpec’s output matcher. I could see this being useful for cli based gems the display feedback for developers.