1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

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|