mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Support both Rails 2 and Rails 3
This commit is contained in:
parent
e6ed2cd8b0
commit
dba9a0421c
1 changed files with 7 additions and 2 deletions
|
@ -3,8 +3,13 @@ require 'capybara/dsl'
|
|||
|
||||
Capybara.app = Rack::Builder.new do
|
||||
map "/" do
|
||||
ActionDispatch::Static
|
||||
run Rails.application
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue