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:
commit
2e260ae319
1 changed files with 8 additions and 2 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in a new issue