1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Merge remote branch 'aslakhellesoy/issue-46-rails3'

This commit is contained in:
Jonas Nicklas 2010-02-25 23:46:08 +01:00
commit 2e260ae319

View file

@ -3,9 +3,15 @@ require 'capybara/dsl'
Capybara.app = Rack::Builder.new do
map "/" do
use Rails::Rack::Static
run ActionController::Dispatcher.new
if Rails.version.to_f >= 3.0
ActionDispatch::Static
run Rails.application
else # Rails 2
use Rails::Rack::Static
run ActionController::Dispatcher.new
end
end
end.to_app
Capybara.asset_root = Rails.root.join('public')