From 49ff50fe257c9eec707d88c879c2bcb5854dbb3c Mon Sep 17 00:00:00 2001 From: zzak Date: Sun, 18 Jun 2023 17:36:33 +0900 Subject: [PATCH] :nail_care: Move `:enddoc: to the top of the file This way we don't need the other `:nodoc:` statements --- railties/lib/rails/test_help.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index b7e658710b985..dbab06ec580a6 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +# :enddoc: + # Make double-sure the RAILS_ENV is not set to production, # so fixtures aren't loaded into that environment abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production? @@ -37,17 +39,15 @@ end end -# :enddoc: - ActiveSupport.on_load(:action_controller_test_case) do - def before_setup # :nodoc: + def before_setup @routes = Rails.application.routes super end end ActiveSupport.on_load(:action_dispatch_integration_test) do - def before_setup # :nodoc: + def before_setup @routes = Rails.application.routes super end