avoid double lookup for plugin helpers

This commit is contained in:
Rimian Perkins 2017-05-22 14:50:53 +10:00
parent 8febaa8be7
commit 2b5dfb6e8e

View File

@ -31,9 +31,8 @@ Spork.prefork do
# Require plugin helpers at plugin/[plugin]/spec/plugin_helper.rb (includes symlinked plugins). # Require plugin helpers at plugin/[plugin]/spec/plugin_helper.rb (includes symlinked plugins).
if ENV['LOAD_PLUGINS'] == "1" if ENV['LOAD_PLUGINS'] == "1"
Dir[Rails.root.join("plugins/**")].each do |plugin| Dir[Rails.root.join("plugins/*/spec/plugin_helper.rb")].each do |f|
helper = "#{plugin}/spec/plugin_helper.rb" require f
require helper if File.exists?(helper)
end end
end end