diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-04-19 20:35:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 20:35:04 -0400 |
commit | e8b4a927340183acba7fd0a2c3864afc2388a9aa (patch) | |
tree | 4d1623d35c470b6c7ada643fb215c9b278f6c193 /railties/test | |
parent | 0871e5e5c1e6151a7ed3bdf7b22209ac11532b31 (diff) | |
parent | a6d907e5880e15c641fc457f7e96187fe1e8509d (diff) | |
download | rails-e8b4a927340183acba7fd0a2c3864afc2388a9aa.tar.gz rails-e8b4a927340183acba7fd0a2c3864afc2388a9aa.tar.bz2 rails-e8b4a927340183acba7fd0a2c3864afc2388a9aa.zip |
Merge pull request #28708 from y-yagi/dont_generate_system_test_files
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.rb | 11 |
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 d3e131db94..8a51beb380 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -451,6 +451,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| |