Permalink
Browse files

Refactor to not include `capybara/rails`

Rails itself is not a Rails application so instead of including
`capybara/rails` we should use the code in there to set up the test. The
only reason capybara needs to include capybara/rails in the first place
is because Rails didn't yet support it.
  • Loading branch information...
eileencodes committed Aug 27, 2016
1 parent 9edc998 commit faba2505ddf6d0c2825cddcc0468a89232a9d8ae
Showing with 13 additions and 2 deletions.
  1. +13 −2 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!

0 comments on commit faba250

Please sign in to comment.