123456789_123456789_123456789_123456789_123456789_

Module: RSpec::Matchers::BuiltIn::CaptureStdout 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 144

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

  original_stream = $stdout
  $stdout = captured_stream

  block.call

  captured_stream.string
ensure
  $stdout = original_stream
end

.name

[ GitHub ]

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

def self.name
  'stdout'
end