123456789_123456789_123456789_123456789_123456789_

Module: RSpec::Matchers::BuiltIn::CaptureStderr Private

Do not use. This module is for internal use only.
Relationships & Source Files
Defined in: rspec-expectations/lib/rspec/matchers/built_in/output.rb

Class Method Summary

Class Method Details

.capture(block)

[ GitHub ]

  
# File 'rspec-expectations/lib/rspec/matchers/built_in/output.rb', line 164

def self.capture(block)
  captured_stream = StringIO.new

  original_stream = $stderr
  $stderr = captured_stream

  block.call

  captured_stream.string
ensure
  $stderr = original_stream
end

.name

[ GitHub ]

  
# File 'rspec-expectations/lib/rspec/matchers/built_in/output.rb', line 160

def self.name
  'stderr'
end