Module: RSpec::Support::WithIsolatedStdErr

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

Instance Method Summary collapse

Instance Method Details

#with_isolated_stderrObject



6
7
8
9
10
11
12
# File 'lib/rspec/support/spec/with_isolated_stderr.rb', line 6

def with_isolated_stderr
  original = $stderr
  $stderr = StringIO.new
  yield
ensure
  $stderr = original
end