diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 421b198..a8132b4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,11 @@ # This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment") + +# Allows loading of an environment config based on the environment +redmine_root = ENV["REDMINE_ROOT"] || File.dirname(__FILE__) + "/../../../.." +require File.expand_path(redmine_root + "/config/environment") + require 'spec' require 'spec/rails'