aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-12-13 02:48:06 +0900
committerGitHub <noreply@github.com>2018-12-13 02:48:06 +0900
commit047d4f260555b4c69fe6ae2d09d4a4cd95fad79a (patch)
tree5adbf3aad2cb3a370f53d2e577142470e06f3c34 /railties/lib/rails/generators/test_unit
parent662f14814eacdc100d0cd511aa05db34119de18a (diff)
parent9bf5545ef7ce13cfc55b35f7d160897dee5cbe0e (diff)
downloadrails-047d4f260555b4c69fe6ae2d09d4a4cd95fad79a.tar.gz
rails-047d4f260555b4c69fe6ae2d09d4a4cd95fad79a.tar.bz2
rails-047d4f260555b4c69fe6ae2d09d4a4cd95fad79a.zip
Merge pull request #34690 from gmcgibbon/rm_integration_test_generator_suffix
Remove redundant suffixes on generated integration tests.
Diffstat (limited to 'railties/lib/rails/generators/test_unit')
-rw-r--r--railties/lib/rails/generators/test_unit/integration/integration_generator.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb
index ae307c5cd9..ba27ed329b 100644
--- a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb
+++ b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb
@@ -10,6 +10,12 @@ module TestUnit # :nodoc:
def create_test_files
template "integration_test.rb", File.join("test/integration", class_path, "#{file_name}_test.rb")
end
+
+ private
+
+ def file_name
+ @_file_name ||= super.sub(/_test\z/i, "")
+ end
end
end
end