1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/test_unit/railtie.rb
Yves Senn 99873ca1ea Revert "Merge pull request #12778 from etehtsea/rake-default-fix"
This reverts commit ec0a2b57f6, reversing
changes made to a8bd7b1626.

This reverts commit 555ec36522

This reverts commit 555ec36522

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.
2014-05-28 17:43:45 +02:00

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