mirror of
https://github.com/teampoltergeist/poltergeist.git
synced 2022-11-09 12:05:00 -05:00
30 lines
616 B
Ruby
30 lines
616 B
Ruby
$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
|
|
|
|
require 'bundler/setup'
|
|
|
|
require 'rspec'
|
|
require 'capybara/poltergeist'
|
|
|
|
RSpec.configure do |config|
|
|
config.before do
|
|
Capybara.configure do |config|
|
|
config.default_selector = :xpath
|
|
end
|
|
end
|
|
end
|
|
|
|
require 'support/test_app'
|
|
|
|
Capybara.default_wait_time = 0 # less timeout so tests run faster
|
|
|
|
alias :running :lambda
|
|
|
|
if ENV['DEBUG']
|
|
Capybara.register_driver :poltergeist do |app|
|
|
Capybara::Poltergeist::Driver.new(app, :debug => true)
|
|
end
|
|
end
|
|
|
|
module TestSessions
|
|
Poltergeist = Capybara::Session.new(:poltergeist, TestApp)
|
|
end
|