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

default RAILS_ENV to test if we're in a test task

This commit is contained in:
Aaron Patterson 2013-03-25 16:06:13 -07:00
parent 1a838ccda4
commit 2e68ecccf7

View file

@ -1,5 +1,9 @@
require "rails"
if defined?(Rake) && Rake.application.top_level_tasks.grep(/^test(?::|$)/).any?
ENV['RAILS_ENV'] ||= 'test'
end
%w(
active_record
action_controller