Sha256: 9fd251225dde3352b64e026f9f35484def1130ea3cf98fe5b29863b8dbce916f

Contents?: true

Size: 753 Bytes

Versions: 21

Compression:

Stored size: 753 Bytes

Contents

unless defined?(INTEGRATION_SPEC_HELPER_LOADED)
  INTEGRATION_SPEC_HELPER_LOADED = true

  require File.dirname(__FILE__) + "/../spec_helper"
  require File.dirname(__FILE__) + "/../hacks/tcp_socket"

  def start_ssl_server
    web_server_pid_file = File.expand_path(File.join(File.dirname(__FILE__), "..", "httpsd.pid"))

    FileUtils.rm(web_server_pid_file) if File.exist?(web_server_pid_file)
    command = File.expand_path(File.join(File.dirname(__FILE__), "..", "script", "httpsd.rb"))
    `#{command} #{web_server_pid_file}`
    TCPSocket.wait_for_service :host => "127.0.0.1", :port => 8443

    yield

    10.times { unless File.exists?(web_server_pid_file); sleep 1; end }
    Process.kill "INT", File.read(web_server_pid_file).to_i
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
braintree-2.10.3 spec/integration/spec_helper.rb
braintree-2.11.0 spec/integration/spec_helper.rb
braintree-2.10.2 spec/integration/spec_helper.rb
braintree-2.10.1 spec/integration/spec_helper.rb
braintree-2.10.0 spec/integration/spec_helper.rb
braintree-2.9.1 spec/integration/spec_helper.rb
braintree-2.8.0 spec/integration/spec_helper.rb
braintree-2.7.0 spec/integration/spec_helper.rb
braintree-2.6.3 spec/integration/spec_helper.rb
braintree-2.6.2 spec/integration/spec_helper.rb
braintree-2.6.1 spec/integration/spec_helper.rb
braintree-2.6.0 spec/integration/spec_helper.rb
braintree-2.5.2 spec/integration/spec_helper.rb
braintree-2.5.1 spec/integration/spec_helper.rb
braintree-2.4.0 spec/integration/spec_helper.rb
braintree-2.3.1 spec/integration/spec_helper.rb
braintree-2.2.0 spec/integration/spec_helper.rb
braintree-2.1.0 spec/integration/spec_helper.rb
braintree-2.0.0 spec/integration/spec_helper.rb
braintree-1.2.1 spec/integration/spec_helper.rb