123456789_123456789_123456789_123456789_123456789_

Module: RSpec::Support::WithIsolatedStdErr

Relationships & Source Files
Defined in: rspec-support/lib/rspec/support/spec/with_isolated_stderr.rb

Instance Method Summary

Instance Method Details

#with_isolated_stderr

[ GitHub ]

  
# File 'rspec-support/lib/rspec/support/spec/with_isolated_stderr.rb', line 6

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