aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-12-11 18:09:16 -0500
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2018-12-11 18:09:16 -0500
commitb93fc47c72c6767655486960dffb41434633c51b (patch)
tree1af70dcf4972f31e7c08e2679d7d3b87204c6f93 /railties/test/generators
parent574234402433065e08a407be7cbdc900e5e0f1a3 (diff)
downloadrails-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.rb14
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