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:
parent
1a838ccda4
commit
2e68ecccf7
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue