mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
da740d63b2
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>
25 lines
606 B
Ruby
25 lines
606 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rails/test_unit/line_filtering"
|
|
|
|
module Rails
|
|
class TestUnitRailtie < Rails::Railtie
|
|
config.app_generators do |c|
|
|
c.test_framework :test_unit, fixture: true,
|
|
fixture_replacement: nil
|
|
|
|
c.integration_tool :test_unit
|
|
c.system_tests :test_unit
|
|
end
|
|
|
|
initializer "test_unit.line_filtering" do
|
|
ActiveSupport.on_load(:active_support_test_case) {
|
|
ActiveSupport::TestCase.extend Rails::LineFiltering
|
|
}
|
|
end
|
|
|
|
rake_tasks do
|
|
load "rails/test_unit/testing.rake"
|
|
end
|
|
end
|
|
end
|