Sha256: 155f366220da2454a106795d414034597bf54e30372e6c4b828c27be0eb42a18
Contents?: true
Size: 419 Bytes
Versions: 10
Compression:
Stored size: 419 Bytes
Contents
module SpecUtils def capture_stderr(&block) original_stderr = $stderr $stderr = fake = StringIO.new begin yield ensure $stderr = original_stderr end fake.string end def capture_stdout(&block) original_stdout = $stdout $stdout = fake = StringIO.new begin yield ensure $stdout = original_stdout end fake.string end end
Version data entries
10 entries across 10 versions & 2 rubygems