Sha256: 0ef30e6572e546dea9ce9dfa517d3f5d182071b53f3ce79b919f3bfa99df64a9
Contents?: true
Size: 434 Bytes
Versions: 12
Compression:
Stored size: 434 Bytes
Contents
# encoding: utf-8 begin require "spec" rescue LoadError abort "You have to install rspec gem!" end require "stringio" def STDOUT.capture(&block) before = self $stdout = StringIO.new block.call $stdout.rewind output = $stdout.read $stdout = before output end def STDERR.capture(&block) before = self $stderr = StringIO.new block.call $stderr.rewind output = $stderr.read $stderr = before output end
Version data entries
12 entries across 12 versions & 2 rubygems