class RSpec::Matchers::BuiltIn::CaptureStderr

@private

Attributes

Public Instance Methods

# File rspec-expectations/lib/rspec/matchers/built_in/output.rb, line 199
def capture(block)
  captured_stream = CapturedStream.new
  captured_stream.as_tty = as_tty

  original_stream = $stderr
  $stderr = captured_stream

  block.call

  captured_stream.string
ensure
  $stderr = original_stream
end
# File rspec-expectations/lib/rspec/matchers/built_in/output.rb, line 195
def name
  'stderr'
end