Sha256: 72f1c81006592bfeb18bee1d7a3a1c377ff61ce99fa040aa41c4ee32b19bf043

Contents?: true

Size: 554 Bytes

Versions: 31

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true
require 'capybara/dsl'

Capybara.app = Rack::Builder.new do
  map "/" do
    if Gem::Version.new(Rails.version) >= Gem::Version.new("3.0")
      run Rails.application
    else # Rails 2
      use Rails::Rack::Static
      run ActionController::Dispatcher.new
    end
  end
end.to_app

Capybara.save_path = Rails.root.join('tmp/capybara')

# Override default rack_test driver to respect data-method attributes.
Capybara.register_driver :rack_test do |app|
  Capybara::RackTest::Driver.new(app, respect_data_method: true)
end

Version data entries

31 entries across 27 versions & 3 rubygems

Version Path
capybara-2.14.1 lib/capybara/rails.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/capybara-2.14.0/lib/capybara/rails.rb
capybara-2.14.0 lib/capybara/rails.rb
tdiary-5.0.4 vendor/bundle/gems/capybara-2.13.0/lib/capybara/rails.rb
capybara-2.13.0 lib/capybara/rails.rb
capybara-2.12.1 lib/capybara/rails.rb
capybara-2.12.0 lib/capybara/rails.rb
capybara-2.11.0 lib/capybara/rails.rb
capybara-2.10.2 lib/capybara/rails.rb
capybara-2.10.1 lib/capybara/rails.rb
capybara-2.10.0 lib/capybara/rails.rb