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 <adrianna.chang@shopify.com>
This commit is contained in:
Étienne Barrié 2021-02-01 16:00:05 -05:00
parent 65979c693b
commit da740d63b2
1 changed files with 0 additions and 4 deletions

View File

@ -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|