mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
99873ca1ea
This reverts commitec0a2b57f6
, reversing changes made toa8bd7b1626
. This reverts commit555ec36522
This reverts commit555ec36522
By default, Rails uses the `default` Rake task to run all tests. This commit changed the environment of the default task to `development`. This clears the development database and has other negative consequences.
18 lines
457 B
Ruby
18 lines
457 B
Ruby
if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
|
|
ENV['RAILS_ENV'] ||= 'test'
|
|
end
|
|
|
|
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
|
|
end
|
|
|
|
rake_tasks do
|
|
load "rails/test_unit/testing.rake"
|
|
end
|
|
end
|
|
end
|