From 886ac1c3087f8ac06bee371af54758fb02760e63 Mon Sep 17 00:00:00 2001 From: Gannon McGibbon Date: Wed, 12 Dec 2018 12:22:59 -0500 Subject: Remove redundant suffixes on generated helpers. --- railties/lib/rails/generators/rails/helper/helper_generator.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/helper/helper_generator.rb b/railties/lib/rails/generators/rails/helper/helper_generator.rb index 3837c10ca0..542eb4c9e8 100644 --- a/railties/lib/rails/generators/rails/helper/helper_generator.rb +++ b/railties/lib/rails/generators/rails/helper/helper_generator.rb @@ -10,6 +10,11 @@ module Rails end hook_for :test_framework + + private + def file_name + @_file_name ||= super.sub(/_helper\z/i, "") + end end end end -- cgit v1.2.3