Sha256: ecf7ce18804a47dab3ed8a5db36b64ebe2ebd378d12dd2c775c49cacc4f2c5e0

Contents?: true

Size: 162 Bytes

Versions: 35

Compression:

Stored size: 162 Bytes

Contents

require 'stringio'
 
module Kernel
  def capture_stdout
    out = StringIO.new
    $stdout = out
    yield
    return out
  ensure
    $stdout = STDOUT
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
activerecord-collections-0.0.7 spec/support/capture_stdout.rb
activerecord-collections-0.0.6 spec/support/capture_stdout.rb
activerecord-collections-0.0.5 spec/support/capture_stdout.rb
activerecord-collections-0.0.4 spec/support/capture_stdout.rb
activerecord-collections-0.0.3 spec/support/capture_stdout.rb
activerecord-collections-0.0.2 spec/support/capture_stdout.rb
zuul-0.2.8 spec/support/capture_stdout.rb
zuul-0.2.7 spec/support/capture_stdout.rb
zuul-0.2.6 spec/support/capture_stdout.rb
zuul-0.2.5 spec/support/capture_stdout.rb
zuul-0.2.4 spec/support/capture_stdout.rb
zuul-0.2.3 spec/support/capture_stdout.rb
zuul-0.2.2 spec/support/capture_stdout.rb
zuul-0.2.1 spec/support/capture_stdout.rb
zuul-0.2.0 spec/support/capture_stdout.rb