Module: RSpec::Support::WithIsolatedStdErr

Defined in:
lib/rspec/support/spec/with_isolated_stderr.rb

Instance Method Summary collapse

Instance Method Details

#with_isolated_stderrObject



4
5
6
7
8
9
10
# 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