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-3.0.0.rc3 unittests/setup/capture_io_helper.rb
commonwatir-3.0.0.rc2 unittests/setup/capture_io_helper.rb
commonwatir-3.0.0.rc1 unittests/setup/capture_io_helper.rb
commonwatir-2.0.4 unittests/setup/capture_io_helper.rb
commonwatir-2.0.3 unittests/setup/capture_io_helper.rb
commonwatir-2.0.2 unittests/setup/capture_io_helper.rb
commonwatir-2.0.2.rc1 unittests/setup/capture_io_helper.rb
commonwatir-2.0.1 unittests/setup/capture_io_helper.rb
commonwatir-2.0.0 unittests/setup/capture_io_helper.rb
commonwatir-2.0.0.rc3 unittests/setup/capture_io_helper.rb
commonwatir-2.0.0.rc2 unittests/setup/capture_io_helper.rb
commonwatir-1.9.2 unittests/setup/capture_io_helper.rb
commonwatir-1.9.2.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.9.1 unittests/setup/capture_io_helper.rb
commonwatir-1.9.1.rc1 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0.rc7 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0.rc6 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0.rc5 unittests/setup/capture_io_helper.rb
commonwatir-1.9.0.rc4 unittests/setup/capture_io_helper.rb