Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to make RSpec fail if anything outputs
RSpec::Matchers.define_negated_matcher :avoid_outputting, :output
RSpec.configure do |config|
config.around do |ex|
expect(&ex).to avoid_outputting.to_stdout.and avoid_outputting.to_stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.