Sha256: b5a3493197705937e6af456ede31315aed45d842272bcd00519cfb7720d7470c

Contents?: true

Size: 381 Bytes

Versions: 6

Compression:

Stored size: 381 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'rubygems'
require 'webmock/rspec'
require 'gem-search'

# http://d.hatena.ne.jp/POCHI_BLACK/20100324
# this method is written by 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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gem-search-0.0.8 spec/spec_helper.rb
gem-search-0.0.7 spec/spec_helper.rb
gem-search-0.0.6 spec/spec_helper.rb
gem-search-0.0.5 spec/spec_helper.rb
gem-search-0.0.3 spec/spec_helper.rb
gem-search-0.0.2 spec/spec_helper.rb