diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 985bea4fb6e..9d88029d04d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -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