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
blabbermouth-0.0.1 spec/support/capture_stdout.rb
activerecord-collections-0.0.26 spec/support/capture_stdout.rb
activerecord-collections-0.0.25 spec/support/capture_stdout.rb
activerecord-collections-0.0.24 spec/support/capture_stdout.rb
activerecord-collections-0.0.23 spec/support/capture_stdout.rb
activerecord-collections-0.0.22 spec/support/capture_stdout.rb
activerecord-collections-0.0.21 spec/support/capture_stdout.rb
activerecord-collections-0.0.20 spec/support/capture_stdout.rb
activerecord-collections-0.0.19 spec/support/capture_stdout.rb
activerecord-collections-0.0.18 spec/support/capture_stdout.rb
activerecord-collections-0.0.17 spec/support/capture_stdout.rb
activerecord-collections-0.0.16 spec/support/capture_stdout.rb
activerecord-collections-0.0.15 spec/support/capture_stdout.rb
activerecord-collections-0.0.14 spec/support/capture_stdout.rb
activerecord-collections-0.0.13 spec/support/capture_stdout.rb
activerecord-collections-0.0.12 spec/support/capture_stdout.rb
activerecord-collections-0.0.11 spec/support/capture_stdout.rb
activerecord-collections-0.0.10 spec/support/capture_stdout.rb
activerecord-collections-0.0.9 spec/support/capture_stdout.rb
activerecord-collections-0.0.8 spec/support/capture_stdout.rb