spec/integration/spec_helper.rb in braintree-3.3.0 vs spec/integration/spec_helper.rb in braintree-3.4.0
- old
+ new
@@ -1,10 +1,10 @@
require "securerandom"
unless defined?(INTEGRATION_SPEC_HELPER_LOADED)
INTEGRATION_SPEC_HELPER_LOADED = true
- SSL_TEST_PORT = ENV['SSL_TEST_PORT'] || 8444
+ SSL_TEST_PORT = ENV["SSL_TEST_PORT"] || 8444
require File.dirname(__FILE__) + "/../spec_helper"
def start_ssl_server
web_server_pid_file = File.expand_path(File.join(File.dirname(__FILE__), "..", "httpsd.pid"))
@@ -12,10 +12,10 @@
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.new("127.0.0.1",SSL_TEST_PORT)
- 10.times { unless File.exists?(web_server_pid_file); sleep 1; end }
+ 10.times { unless File.exist?(web_server_pid_file); sleep 1; end }
ensure
Process.kill "INT", File.read(web_server_pid_file).to_i
end
def create_modification_for_tests(attributes)