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

Version Path
has_token_id-0.5.0 test/support/test_case.rb
has_token_id-0.4.3 test/support/test_case.rb
has_token_id-0.4.2 test/support/test_case.rb
has_token_id-0.4.1 test/support/test_case.rb
has_token_id-0.4.0 test/support/test_case.rb
dummier-0.3.2 test/support/test_case.rb
has_token_id-0.3.1 test/support/test_case.rb
has_token_id-0.3.0 test/support/test_case.rb
has_token_id-0.2.0 test/support/test_case.rb
has_token_id-0.1.0 test/support/test_case.rb
dummier-0.3.0 test/support/test_case.rb