Sha256: 64cc4b2ae3e19632e86d6dd6806c02f498ec5a705b2eb72fae599176f37ed0ff

Contents?: true

Size: 1.36 KB

Versions: 9

Compression:

Stored size: 1.36 KB

Contents

require "rubygems"
require "spec"
require "spec/autorun"
require "selenium_rc"
require "thin"
dir = File.dirname(__FILE__)
LIBRARY_ROOT_DIR = File.expand_path("#{dir}/../..")
require File.expand_path("#{dir}/../spec_helpers/be_http")
require File.expand_path("#{dir}/../spec_helpers/show_test_exceptions")
require File.expand_path("#{dir}/../spec_helpers/wait_for")
require "#{dir}/functional_spec_server_starter"
ARGV.push("-b")

Spec::Runner.configure do |config|
  config.mock_with :rr
end

Sinatra::Application.use ShowTestExceptions
Sinatra::Application.set :raise_errors, true

Sinatra::Application.use(JsTestServer::Server::App)

class Spec::ExampleGroup
  include WaitFor

  def self.start_servers(framework_name)
    before(:all) do
      server = SeleniumRC::Server.new("0.0.0.0", "4444")
      unless server.service_is_running?
        worker = fork do
          server.boot
          exit!
        end
      end
      trap("INT") do
        server.stop
      end
      at_exit do
        server.stop
      end

      FunctionalSpecServerStarter.new(framework_name).call
      TCPSocket.wait_for_service :host => "0.0.0.0", :port => "4444"
    end

    after(:suite) do
      FunctionalSpecServerStarter.new(framework_name).stop_thin_server
    end
  end


  def root_url
    "http://#{JsTestServer::Server::DEFAULTS[:host]}:#{JsTestServer::Server::DEFAULTS[:port]}"
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
honkster-js-test-server-0.2.12 spec/functional/functional_spec_helper.rb
honkster-js-test-server-0.2.11 spec/functional/functional_spec_helper.rb
honkster-js-test-server-0.2.10 spec/functional/functional_spec_helper.rb
honkster-js-test-server-0.2.9 spec/functional/functional_spec_helper.rb
js-test-server-0.2.8 spec/functional/functional_spec_helper.rb
js-test-server-0.2.7 spec/functional/functional_spec_helper.rb
js-test-server-0.2.6 spec/functional/functional_spec_helper.rb
js-test-server-0.2.1 spec/functional/functional_spec_helper.rb
js-test-server-0.2.0 spec/functional/functional_spec_helper.rb