From 3ff263919c67588e4348da30cb92b860fe83cba5 Mon Sep 17 00:00:00 2001 From: wangjohn Date: Wed, 17 Apr 2013 18:10:17 -0400 Subject: Moved the check for the rails test environment into rails/test_unit so that you can select frameworks separately when running rake test. --- railties/lib/rails/test_unit/railtie.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib/rails/test_unit') diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb index f52c4c44b7..ab1ebe1f8c 100644 --- a/railties/lib/rails/test_unit/railtie.rb +++ b/railties/lib/rails/test_unit/railtie.rb @@ -1,3 +1,7 @@ +if defined?(Rake) && 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| -- cgit v1.2.3