aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-04-09 10:48:56 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-04-12 21:09:15 +0900
commita6d907e5880e15c641fc457f7e96187fe1e8509d (patch)
tree3cdb220f81da193688659a9adee8489063134a30 /railties/test
parentf785ad786ae49dd6f7a2f1d77c44ea17008c6656 (diff)
downloadrails-a6d907e5880e15c641fc457f7e96187fe1e8509d.tar.gz
rails-a6d907e5880e15c641fc457f7e96187fe1e8509d.tar.bz2
rails-a6d907e5880e15c641fc457f7e96187fe1e8509d.zip
Don't generate system test files if `skip_system_test` option is specified
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 7965bd68d0..0016714383 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -452,6 +452,17 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_does_not_generate_system_test_files_if_skip_system_test_is_given
+ run_generator [destination_root, "--skip_system_test"]
+
+ Dir.chdir(destination_root) do
+ quietly { `./bin/rails g scaffold User` }
+
+ assert_no_file("test/application_system_test_case.rb")
+ assert_no_file("test/system/users_test.rb")
+ end
+ end
+
def test_generator_if_api_is_given
run_generator [destination_root, "--api"]
assert_file "Gemfile" do |content|