diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-12-12 12:10:45 -0500 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-12-12 12:12:51 -0500 |
commit | 9bf5545ef7ce13cfc55b35f7d160897dee5cbe0e (patch) | |
tree | 5adbf3aad2cb3a370f53d2e577142470e06f3c34 /railties/lib/rails/generators | |
parent | 662f14814eacdc100d0cd511aa05db34119de18a (diff) | |
download | rails-9bf5545ef7ce13cfc55b35f7d160897dee5cbe0e.tar.gz rails-9bf5545ef7ce13cfc55b35f7d160897dee5cbe0e.tar.bz2 rails-9bf5545ef7ce13cfc55b35f7d160897dee5cbe0e.zip |
Remove redundant suffixes on generated integration tests.
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/test_unit/integration/integration_generator.rb | 6 |
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 |