From da740d63b2b9cb22998d10bc79d798050eec22ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Mon, 1 Feb 2021 16:00:05 -0500 Subject: [PATCH] Stop setting RAILS_ENV when test_unit railtie is loaded Because the TestUnit::Runner is used to run the tests from Rake test tasks, we don't need to set the Rails environment based on the name of the task anymore. Co-authored-by: Adrianna Chang --- railties/lib/rails/test_unit/railtie.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb index 42b6daa3d1..8de9482da4 100644 --- a/railties/lib/rails/test_unit/railtie.rb +++ b/railties/lib/rails/test_unit/railtie.rb @@ -2,10 +2,6 @@ require "rails/test_unit/line_filtering" -if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any? - ENV["RAILS_ENV"] ||= Rake.application.options.show_tasks ? "development" : "test" -end - module Rails class TestUnitRailtie < Rails::Railtie config.app_generators do |c|