Sha256: 1c8bc131c623039674c7c673fbc115bfd1ccbeb00977516d63d5a5f59658b4c6
Contents?: true
Size: 958 Bytes
Versions: 4
Compression:
Stored size: 958 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/spec_helper") describe "bin/selenium-rc" do attr_reader :root_dir before do dir = File.dirname(__FILE__) @root_dir = File.expand_path("#{dir}/..") unless File.exists?("#{root_dir}/vendor/selenium-server.jar") raise "vendor/selenium-server.jar does not exist. Try running `rake download_jar_file` to install the jar file." end end after do SeleniumRC::Server.new.stop TCPSocket.wait_for_service_termination(:host => "0.0.0.0", :port => 4444) end it "starts the SeleniumRC server from the downloaded jar file" do Dir.chdir(root_dir) do system("bin/selenium-rc &") || raise("bin/selenium-server failed") end start_time = Time.now timeout = 15 until SeleniumRC::Server.service_is_running? if Time.now > (start_time + timeout) raise SocketError.new("Socket did not open within #{timeout} seconds") end end end end
Version data entries
4 entries across 4 versions & 1 rubygems