module RSpec::Support::WithIsolatedStdErr

Public Instance Methods

with_isolated_stderr() { || ... } click to toggle source
# File lib/rspec/support/spec/with_isolated_stderr.rb, line 4
def with_isolated_stderr
  original = $stderr
  $stderr = StringIO.new
  yield
ensure
  $stderr = original
end