1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/spec/spec_helper.rb
Nicklas Ramhöj 844bd776ae Use same session in all specs
This prevents most of all Selenium from opening
dozens of browser windows.
2010-09-07 18:20:04 +02:00

30 lines
747 B
Ruby

$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
$:.unshift(File.dirname(__FILE__))
require 'rubygems'
require "bundler/setup"
require 'spec'
require 'spec/autorun'
require 'capybara'
require 'capybara/spec/driver'
require 'capybara/spec/session'
alias :running :lambda
Capybara.default_wait_time = 0 # less timeout so tests run faster
module TestSessions
RackTest = Capybara::Session.new(:rack_test, TestApp)
Selenium = Capybara::Session.new(:selenium, TestApp)
Culerity = Capybara::Session.new(:culerity, TestApp)
Celerity = Capybara::Session.new(:celerity, TestApp)
end
Spec::Runner.configure do |config|
config.before do
Capybara.configure do |config|
config.default_selector = :xpath
end
end
end