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
1 changed files with 2 additions and 3 deletions

View File

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