Allows configure plugins directory path in order to change the default location in test environment (#36320).

Patch by @tohosaku.

git-svn-id: https://svn.redmine.org/redmine/trunk@22507 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2023-12-10 03:34:16 +00:00
parent ac36333e90
commit e6f2e33856
5 changed files with 10 additions and 4 deletions

View File

@@ -23,8 +23,9 @@ class Redmine::PluginLoaderTest < ActiveSupport::TestCase
def setup
clear_public
# Change plugin directory for testing to default in config/environments/tesr.rb.
# plugins/foo => test/fixtures/plugins/foo
@klass = Redmine::PluginLoader
@klass.directory = Rails.root.join('test/fixtures/plugins')
@klass.public_directory = Rails.root.join('tmp/public/plugin_assets')
@klass.load
end