From e6f2e3385684ba95167a6728c9df95413a841e06 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 10 Dec 2023 03:34:16 +0000 Subject: 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 --- test/unit/lib/redmine/plugin_loader_test.rb | 3 ++- test/unit/lib/redmine/plugin_test.rb | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test/unit/lib') diff --git a/test/unit/lib/redmine/plugin_loader_test.rb b/test/unit/lib/redmine/plugin_loader_test.rb index ed5943346..458460986 100644 --- a/test/unit/lib/redmine/plugin_loader_test.rb +++ b/test/unit/lib/redmine/plugin_loader_test.rb @@ -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 diff --git a/test/unit/lib/redmine/plugin_test.rb b/test/unit/lib/redmine/plugin_test.rb index 02df23236..9cfd7e7da 100644 --- a/test/unit/lib/redmine/plugin_test.rb +++ b/test/unit/lib/redmine/plugin_test.rb @@ -22,9 +22,8 @@ require_relative '../../../test_helper' class Redmine::PluginTest < ActiveSupport::TestCase def setup @klass = Redmine::Plugin - # Change plugin directory for testing to default + # Change plugin directory for testing to default in config/environments/test.rb. # plugins/foo => test/fixtures/plugins/foo - @klass.directory = Rails.root.join('test/fixtures/plugins') # In case some real plugins are installed @klass.clear -- cgit v1.2.3