diff options
Diffstat (limited to 'spec/support/silence_stdout.rb')
-rw-r--r-- | spec/support/silence_stdout.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/silence_stdout.rb b/spec/support/silence_stdout.rb new file mode 100644 index 00000000000..b2bc65c5cda --- /dev/null +++ b/spec/support/silence_stdout.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +RSpec.configure do |config| + # Allows stdout to be redirected to reduce noise + config.before(:each, :silence_stdout) do + $stdout = StringIO.new + end + + config.after(:each, :silence_stdout) do + $stdout = STDOUT + end +end |