2009-12-31 15:28:48 -05:00
|
|
|
require "rails"
|
|
|
|
|
2013-04-03 12:51:48 -04:00
|
|
|
if defined?(Rake) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
|
2013-03-25 19:06:13 -04:00
|
|
|
ENV['RAILS_ENV'] ||= 'test'
|
|
|
|
end
|
|
|
|
|
2009-12-31 15:28:48 -05:00
|
|
|
%w(
|
|
|
|
active_record
|
|
|
|
action_controller
|
|
|
|
action_mailer
|
2010-01-27 20:39:11 -05:00
|
|
|
rails/test_unit
|
2012-10-18 00:03:24 -04:00
|
|
|
sprockets
|
2009-12-31 15:28:48 -05:00
|
|
|
).each do |framework|
|
|
|
|
begin
|
2009-12-31 16:11:54 -05:00
|
|
|
require "#{framework}/railtie"
|
2009-12-31 15:28:48 -05:00
|
|
|
rescue LoadError
|
|
|
|
end
|
2010-02-04 12:29:18 -05:00
|
|
|
end
|