Sha256: 385b93152362ba25801b53959cfcb3088d58c383ca5e9948b0ce0f1e13703fa4

Contents?: true

Size: 217 Bytes

Versions: 35

Compression:

Stored size: 217 Bytes

Contents

require "stringio"

module CaptureIOHelper
  
  def capture_stdout(&blk)
    old = $stdout
    $stdout = io = StringIO.new
    
    yield
    
    io.string
  ensure
    $stdout = old
  end
end    


Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
commonwatir-1.9.0.rc3 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0.rc2 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.8.1 unittests/setup/capture_io_helper.rb
commonwatir-1.8.1.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.8.0 unittests/setup/capture_io_helper.rb
commonwatir-1.8.0.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.7.1 unittests/setup/capture_io_helper.rb
commonwatir-1.7.0 unittests/setup/capture_io_helper.rb
commonwatir-1.7.0.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.6.7 unittests/setup/capture_io_helper.rb
commonwatir-1.6.7.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.6.6 unittests/setup/capture_io_helper.rb
commonwatir-1.6.6.rc2 unittests/setup/capture_io_helper.rb
commonwatir-1.6.6.rc1 unittests/setup/capture_io_helper.rb