Permalink
Browse files

Delay requiring selenium until driver is used, closes #1018

  • Loading branch information...
1 parent fd469ff commit 07f2a714acd67b278451e5fef0de2d915ae8b994 @jnicklas committed Mar 18, 2013
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/capybara.rb
View
18 lib/capybara.rb
@@ -310,15 +310,6 @@ module Selenium; end
require 'capybara/driver/base'
require 'capybara/driver/node'
-
- require 'capybara/rack_test/driver'
- require 'capybara/rack_test/node'
- require 'capybara/rack_test/form'
- require 'capybara/rack_test/browser'
- require 'capybara/rack_test/css_handlers.rb'
-
- require 'capybara/selenium/node'
- require 'capybara/selenium/driver'
end
Capybara.configure do |config|
@@ -337,9 +328,18 @@ module Selenium; end
end
Capybara.register_driver :rack_test do |app|
+ require 'capybara/rack_test/driver'
+ require 'capybara/rack_test/node'
+ require 'capybara/rack_test/form'
+ require 'capybara/rack_test/browser'
+ require 'capybara/rack_test/css_handlers.rb'
+
Capybara::RackTest::Driver.new(app)
end
Capybara.register_driver :selenium do |app|
+ require 'capybara/selenium/node'
+ require 'capybara/selenium/driver'
+
Capybara::Selenium::Driver.new(app)
end

0 comments on commit 07f2a71

Please sign in to comment.