Sha256: 737c82e9ad66402ff30411a1c52a5e90382a9ff9c23ae4459c24f49789e33663
Contents?: true
Size: 534 Bytes
Versions: 33
Compression:
Stored size: 534 Bytes
Contents
module Omnibus module RSpec module OutputHelpers # # Capture stdout within this block. # def capture_stdout(&block) old = $stdout $stdout = fake = StringIO.new yield fake.string ensure $stdout = old end # # Capture stderr within this block. # def capture_stderr(&block) old = $stderr $stderr = fake = StringIO.new yield fake.string ensure $stderr = old end end end end
Version data entries
33 entries across 33 versions & 1 rubygems