Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 21 lines (17 sloc) 0.56 kb
6b099a4 renamed to capybara
Theo Hultberg and Jonas Nicklas authored
1 require 'capybara'
2 require 'capybara/dsl'
3
4 Capybara.app = Rack::Builder.new do
5 map "/" do
78e3a48 @Burgestrand Make sure we are comparing gem versions, closes #1024
Burgestrand authored
6 if Gem::Version.new(Rails.version) >= Gem::Version.new("3.0")
9c1dd62 @carlosantoniodasilva Move the RackTest driver override to capybara/rails
carlosantoniodasilva authored
7 run Rails.application
dba9a04 @aslakhellesoy Support both Rails 2 and Rails 3
aslakhellesoy authored
8 else # Rails 2
9 use Rails::Rack::Static
10 run ActionController::Dispatcher.new
11 end
6b099a4 renamed to capybara
Theo Hultberg and Jonas Nicklas authored
12 end
6a3abbe @jnicklas Whitespace!
authored
13 end.to_app
6b099a4 renamed to capybara
Theo Hultberg and Jonas Nicklas authored
14
fecc928 @jnicklas Set sensible save_and_open_page_path by default
authored
15 Capybara.save_and_open_page_path = Rails.root.join('tmp/capybara')
e6ed2cd rails3
Robot Made authored
16
9c1dd62 @carlosantoniodasilva Move the RackTest driver override to capybara/rails
carlosantoniodasilva authored
17 # Override default rack_test driver to respect data-method attributes.
18 Capybara.register_driver :rack_test do |app|
19 Capybara::RackTest::Driver.new(app, :respect_data_method => true)
20 end
Something went wrong with that request. Please try again.