Sha256: 62cfcd408582151b0ed2170c3f6e34396bc3725df5719d0f65c3d65370af1d99
Contents?: true
Size: 323 Bytes
Versions: 11
Compression:
Stored size: 323 Bytes
Contents
class MiniTest::Should::TestCase # Borrowed from thor .. thanks wycats! :) def capture(stream) begin stream = stream.to_s eval "$#{stream} = StringIO.new" yield result = eval("$#{stream}").string ensure eval("$#{stream} = #{stream.upcase}") end result end end
Version data entries
11 entries across 11 versions & 2 rubygems