FEATURE: Require spec helpers for plugins

* Follows any symlinked plugins
This commit is contained in:
Rimian Perkins 2017-05-19 12:38:36 +10:00
parent ef2811f39a
commit 8febaa8be7
1 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,14 @@ Spork.prefork do
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
Dir[Rails.root.join("spec/fabricators/*.rb")].each {|f| require f}
# 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)
end
end
# let's not run seed_fu every test
SeedFu.quiet = true if SeedFu.respond_to? :quiet