diff options
author | Yoshiyuki Hirano <yhirano@me.com> | 2018-04-22 12:09:04 +0900 |
---|---|---|
committer | Yoshiyuki Hirano <yhirano@me.com> | 2018-04-22 12:09:04 +0900 |
commit | 8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe (patch) | |
tree | c464d7129dbb4ee42296e10649976e9abf1af24e /railties/lib/rails/generators/test_unit | |
parent | 7452351815f0c49164c02368d12d28a83df5134d (diff) | |
download | rails-8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe.tar.gz rails-8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe.tar.bz2 rails-8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe.zip |
Fix duplicated suffix for JobGenerator
Diffstat (limited to 'railties/lib/rails/generators/test_unit')
-rw-r--r-- | railties/lib/rails/generators/test_unit/job/job_generator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/test_unit/job/job_generator.rb b/railties/lib/rails/generators/test_unit/job/job_generator.rb index a99ce914c0..ab622ec5e4 100644 --- a/railties/lib/rails/generators/test_unit/job/job_generator.rb +++ b/railties/lib/rails/generators/test_unit/job/job_generator.rb @@ -10,6 +10,11 @@ module TestUnit # :nodoc: def create_test_file template "unit_test.rb", File.join("test/jobs", class_path, "#{file_name}_job_test.rb") end + + private + def file_name + @_file_name ||= super.gsub(/_job/i, "") + end end end end |