Sha256: b615b61bd9b54abd8128c212f9dd6e00fc6dd3dbd12ed549354f77bab007cc9d

Contents?: true

Size: 542 Bytes

Versions: 1

Compression:

Stored size: 542 Bytes

Contents

require 'rest-builder'

require 'pork/auto'
require 'muack'
require 'webmock'

WebMock.enable!
WebMock.disable_net_connect!(:allow_localhost => true)
Pork::Suite.include(Muack::API, WebMock::API)

class Pork::Suite
  def with_img
    f = Tempfile.new(['img', '.jpg'])
    n = File.basename(f.path)
    f.write('a'*10)
    f.rewind
    yield(f, n)
  ensure
    f.close!
  end

  def stub_select_for_stringio
    stub(IO).select(where([is_a(StringIO)]), [], [],
                    RestBuilder::EventSource::READ_WAIT){ |rd, *| rd }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rest-builder-0.9.2 lib/rest-builder/test.rb