Sha256: 86f9e09ec6e4f374c76797693d2e0ff80d8f7d44c164f0c8d76633a6eaaba53c

Contents?: true

Size: 456 Bytes

Versions: 7

Compression:

Stored size: 456 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib/excon'))

Bundler.require_env(:test)

def local_file(*parts)
  File.expand_path(File.join(File.dirname(__FILE__), *parts))
end

def with_rackup(configru = local_file('config.ru'), rackup = local_file('..', 'bin', 'rackup'))
  pid, w, r, e = Open4.popen4("#{rackup} #{configru}")
  while `lsof -p #{pid} -P -i | grep ruby | grep TCP`.chomp.empty?; end
  yield
  Process.kill(9, pid)
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
excon-0.0.14 tests/test_helper.rb
excon-0.0.13 tests/test_helper.rb
excon-0.0.12 tests/test_helper.rb
excon-0.0.11 tests/test_helper.rb
excon-0.0.10 tests/test_helper.rb
excon-0.0.8 tests/test_helper.rb
excon-0.0.7 tests/test_helper.rb