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

inline test runner check into as/testing/autorun.rb.

This makes it possible to easily get the runner working with existing
setups that rely on `active_support/testing/autorun.rb`.
This commit is contained in:
Yves Senn 2015-06-08 14:51:47 +02:00
parent 96bb004fc6
commit eec932704f
2 changed files with 9 additions and 5 deletions

View file

@ -2,4 +2,11 @@ gem 'minitest'
require 'minitest'
Minitest.autorun
if Minitest.respond_to?(:run_with_rails_extension)
unless Minitest.run_with_rails_extension
Minitest.run_with_autorun = true
Minitest.autorun
end
else
Minitest.autorun
end

View file

@ -9,10 +9,7 @@ require 'action_controller/test_case'
require 'action_dispatch/testing/integration'
require 'rails/generators/test_case'
unless Minitest.run_with_rails_extension
Minitest.run_with_autorun = true
require 'active_support/testing/autorun'
end
require 'active_support/testing/autorun'
if defined?(ActiveRecord::Base)
ActiveRecord::Migration.maintain_test_schema!