aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/system_testing/test_helper.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/actionpack/lib/system_testing/test_helper.rb b/actionpack/lib/system_testing/test_helper.rb
index bb68cfe665..bbf4e469ac 100644
--- a/actionpack/lib/system_testing/test_helper.rb
+++ b/actionpack/lib/system_testing/test_helper.rb
@@ -1,11 +1,22 @@
-require 'capybara/rails'
+require 'capybara/dsl'
require 'system_testing/test_helpers'
module SystemTesting
module TestHelper
- include Capybara::DSL
include TestHelpers::FormHelper
include TestHelpers::Assertions
+ include Capybara::DSL
+
+ Capybara.app = Rack::Builder.new do
+ map "/" do
+ run Rails.application
+ end
+ end
+
+ def before_setup
+ Base.driver.call
+ super
+ end
def after_teardown
Capybara.reset_sessions!