Sha256: 770f945983710d969a3b44164572dd384d412ca46002402d77f3ba78d7731f43

Contents?: true

Size: 543 Bytes

Versions: 7

Compression:

Stored size: 543 Bytes

Contents

require 'spec_helper'
require 'rubygems'
require 'bundler/setup'

require 'em-http'
require 'em-http/middleware/oauth2'
require 'multi_json'

require 'stallion'
require 'stub_server'

def failed(http = nil)
  EventMachine.stop
  http ? fail(http.error) : fail
end

def requires_connection(&blk)
  blk.call if system('ping -t1 -c1 google.com 2>&1 > /dev/null')
end

def requires_port(port, &blk)
  port_open = true
  begin
    s = TCPSocket.new('localhost', port)
    s.close()
  rescue
    port_open = false
  end

  blk.call if port_open
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
em-http-request-samesite-0.1.1 spec/helper.rb
em-http-request-samesite-1.1.7 spec/helper.rb
em-http-request-1.1.7 spec/helper.rb
em-http-request-1.1.6 spec/helper.rb
em-http-request-1.1.5 spec/helper.rb
em-http-request-1.1.4 spec/helper.rb
em-http-request-1.1.3 spec/helper.rb