Module: RailsSemanticLogging::RSpec::Helpers::SilenceOutput
- Defined in:
- lib/rails_semantic_logging/rspec/helpers.rb
Overview
Helper to silence stdout output in tests
Instance Method Summary collapse
Instance Method Details
#silence_stdout ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/rails_semantic_logging/rspec/helpers.rb', line 34 def silence_stdout original_stdout = $stdout $stdout = StringIO.new yield ensure $stdout = original_stdout end |