From 5e1651f5400c6bd9aa7c93bbbad9937a891b7639 Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Sun, 30 Jun 2024 19:29:46 -0400 Subject: [PATCH] Remove test_unit plugin_generator While looking for templates using the `.rb` extension instead of `.rb.tt`, my search ended up finding this `test_helper.rb` file. ``` $ fd | rg "/templates/.*\.rb$" ./actioncable/lib/rails/generators/channel/templates/application_cable/channel.rb ./actioncable/lib/rails/generators/channel/templates/application_cable/connection.rb ./railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb ``` Instead of correcting the extension, I opted to remove it because the `test_unit:plugin` generator appears to be unused. --- .../test_unit/plugin/plugin_generator.rb | 15 --------------- .../plugin/templates/%file_name%_test.rb.tt | 7 ------- .../test_unit/plugin/templates/test_helper.rb | 2 -- 3 files changed, 24 deletions(-) delete mode 100644 railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb delete mode 100644 railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt delete mode 100644 railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb diff --git a/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb b/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb deleted file mode 100644 index 0657bc23894b1..0000000000000 --- a/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require "rails/generators/test_unit" - -module TestUnit # :nodoc: - module Generators # :nodoc: - class PluginGenerator < Base # :nodoc: - check_class_collision suffix: "Test" - - def create_test_files - directory ".", "test" - end - end - end -end diff --git a/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt b/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt deleted file mode 100644 index 39eb17ce5448a..0000000000000 --- a/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class <%= class_name %>Test < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb b/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb deleted file mode 100644 index 4eb3868c6b88d..0000000000000 --- a/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -require "active_support/testing/autorun" -require "active_support"