aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/railtie.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2016-11-12 09:49:28 -0500
committereileencodes <eileencodes@gmail.com>2017-02-20 15:07:33 -0500
commit84f82f0a84de0906d195b529a9f780141c43507a (patch)
treef2919614c9ce8f0adccdfd83e47d43f6484d17bc /railties/lib/rails/test_unit/railtie.rb
parent1db7a5c285eeb61acc998c0c27788a61bd948d5c (diff)
downloadrails-84f82f0a84de0906d195b529a9f780141c43507a.tar.gz
rails-84f82f0a84de0906d195b529a9f780141c43507a.tar.bz2
rails-84f82f0a84de0906d195b529a9f780141c43507a.zip
Refactor config settings to use generated file
Originally I had set up system testing to have one configuration option to be set in the test environment. After thinking it over I think a generated class on app creation would be best. The reason for this is Capybara has a ton of configuration options that I'm sure some folks want to use. Thinking about how we handle screenshots, database transactions, and a whole bunch of other settings it would be better for users to be able to turn all of that on and off. When an app or scaffold is generated a `test/system_test_helper.rb` test helper will be generated as well. This will contain the class for tests to inherit from `ActionSystemTestCase` which will inherit from `ActionSystemTest::Base`. Here is where users can change the test driver, remove the screenshot helper, and add their additional Capybara configuration.
Diffstat (limited to 'railties/lib/rails/test_unit/railtie.rb')
-rw-r--r--railties/lib/rails/test_unit/railtie.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb
index 694c8d92b1..9cc3f73a9c 100644
--- a/railties/lib/rails/test_unit/railtie.rb
+++ b/railties/lib/rails/test_unit/railtie.rb
@@ -11,7 +11,7 @@ module Rails
fixture_replacement: nil
c.integration_tool :test_unit
- c.system_tool :test_unit
+ c.system_tests :test_unit
end
initializer "test_unit.line_filtering" do
@@ -20,18 +20,6 @@ module Rails
}
end
- config.system_testing = ActiveSupport::OrderedOptions.new
-
- initializer "system_testing.set_configs" do |app|
- ActiveSupport.on_load(:active_support_test_case) do
- require "action_system_test"
-
- options = app.config.system_testing
- options.driver ||= ActionSystemTest.default_driver
- options.each { |k, v| ActionSystemTest.send("#{k}=", v) }
- end
- end
-
rake_tasks do
load "rails/test_unit/testing.rake"
end