Sha256: 2202a1927672977a7756519975e518e66c2ec49895060518e6dd1e992625cb7f

Contents?: true

Size: 818 Bytes

Versions: 1

Compression:

Stored size: 818 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

root = File.dirname(__FILE__) + '/../'

require root + 'vendor/capybara/spec/spec_helper'
require root + 'lib/terminus'

def select_browser
  if ua = ENV['USER_AGENT']
    Terminus.browser = {:name => ua}
  else
    Terminus.browser = :docked
  end
end

# We use WEBrick to boot the test app, because if we use Thin (the default) the
# slow response used to test Ajax resynchronization blocks the event loop. This
# stops Terminus receiving messages and causes false positives: the client is
# not really waiting for Ajax to complete, it's just having its messages blocked
# because EventMachine is frozen.

Capybara.server do |app, port|
  handler = Rack::Handler.get('webrick')
  handler.run(app, :Port => port, :AccessLog => [], :Logger => WEBrick::Log::new(nil, 0))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
terminus-0.3.0 spec/spec_helper.rb