aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-01-18 14:54:13 -0500
committerGitHub <noreply@github.com>2018-01-18 14:54:13 -0500
commit7df7780e40b08ebc27b9a9650148e93f144ab1e6 (patch)
tree4a2863fa2ff7a7b6b8d053dc144c0ccbf6c5084a
parente0ad907ade3bca1c57a32c1987c4080305019845 (diff)
parenta2aa18f897dbcd503ed3b782258a44b21ca752bd (diff)
downloadrails-7df7780e40b08ebc27b9a9650148e93f144ab1e6.tar.gz
rails-7df7780e40b08ebc27b9a9650148e93f144ab1e6.tar.bz2
rails-7df7780e40b08ebc27b9a9650148e93f144ab1e6.zip
Merge pull request #31730 from bogdanvlviv/allow_false_for-config-generators-system_tests
Allow `false` for `config.generators.system_tests=`
-rw-r--r--guides/source/configuring.md1
-rw-r--r--railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index 879a1ea89f..98cd5e8fe5 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -200,6 +200,7 @@ The full set of methods that can be used in this block are as follows:
* `force_plural` allows pluralized model names. Defaults to `false`.
* `helper` defines whether or not to generate helpers. Defaults to `true`.
* `integration_tool` defines which integration tool to use to generate integration tests. Defaults to `:test_unit`.
+* `system_tests` defines which integration tool to use to generate system tests. Defaults to `:test_unit`.
* `javascripts` turns on the hook for JavaScript files in generators. Used in Rails for when the `scaffold` generator is run. Defaults to `true`.
* `javascript_engine` configures the engine to be used (for eg. coffee) when generating assets. Defaults to `:js`.
* `orm` defines which orm to use. Defaults to `false` and will use Active Record by default.
diff --git a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb
index b6c13b41ae..e2e8b18eab 100644
--- a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb
@@ -23,7 +23,7 @@ module TestUnit # :nodoc:
template template_file,
File.join("test/controllers", controller_class_path, "#{controller_file_name}_controller_test.rb")
- unless options.api? || options[:system_tests].nil?
+ if !options.api? && options[:system_tests]
template "system_test.rb", File.join("test/system", class_path, "#{file_name.pluralize}_test.rb")
end
end