Sha256: 68e0253f145fe05f91ad393a1ccdb6ae5696e7861025cbab9c497cfe4d1f7063

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))

require 'rubygems'
require "bundler/setup"

require 'rspec'
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

RSpec.configure do |config|

  running_with_jruby = RUBY_PLATFORM =~ /java/
  jruby_installed = `which jruby` && $?.success?

  warn "** Skipping Celerity specs because platform is not Java" unless running_with_jruby
  warn "** Skipping Culerity specs because JRuby is not installed" unless jruby_installed

  config.filter_run_excluding(:jruby => lambda { |value|
    return true if value == :platform && !running_with_jruby
    return true if value == :installed && !jruby_installed
  })

  config.before do
    Capybara.configure do |config|
      config.default_selector = :xpath
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
capybara-0.4.1.2 spec/spec_helper.rb
capybara-rails-2-2-0.4.1.1 spec/spec_helper.rb
rcarvalho-capybara-0.4.1.2 spec/spec_helper.rb
rcarvalho-capybara-0.4.1.1 spec/spec_helper.rb
capybara-0.4.1.1 spec/spec_helper.rb
capybara-0.4.1.rc spec/spec_helper.rb
capybara-0.4.0 spec/spec_helper.rb
capybara-0.4.0.rc spec/spec_helper.rb