diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-12-11 18:09:16 -0500 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-12-11 18:09:16 -0500 |
commit | b93fc47c72c6767655486960dffb41434633c51b (patch) | |
tree | 1af70dcf4972f31e7c08e2679d7d3b87204c6f93 /railties/test/generators | |
parent | 574234402433065e08a407be7cbdc900e5e0f1a3 (diff) | |
download | rails-b93fc47c72c6767655486960dffb41434633c51b.tar.gz rails-b93fc47c72c6767655486960dffb41434633c51b.tar.bz2 rails-b93fc47c72c6767655486960dffb41434633c51b.zip |
Remove redundant suffixes on generated system tests.
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/system_test_generator_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/generators/system_test_generator_test.rb b/railties/test/generators/system_test_generator_test.rb index efa70a050b..5742ba444d 100644 --- a/railties/test/generators/system_test_generator_test.rb +++ b/railties/test/generators/system_test_generator_test.rb @@ -16,4 +16,18 @@ class SystemTestGeneratorTest < Rails::Generators::TestCase run_generator %w(admin/user) assert_file "test/system/admin/users_test.rb", /class Admin::UsersTest < ApplicationSystemTestCase/ end + + def test_test_name_is_pluralized + run_generator %w(user) + + assert_no_file "test/system/user_test.rb" + assert_file "test/system/users_test.rb" + end + + def test_test_suffix_is_not_duplicated + run_generator %w(users_test) + + assert_no_file "test/system/users_test_test.rb" + assert_file "test/system/users_test.rb" + end end |