summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-12-10 03:34:16 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-12-10 03:34:16 +0000
commite6f2e3385684ba95167a6728c9df95413a841e06 (patch)
tree98723e59b2a7f6547b8b8b8ce17af96e84aa47ca /test/unit/lib
parentac36333e90d9ae3386829afdb3b4c1d8bac172f5 (diff)
downloadredmine-e6f2e3385684ba95167a6728c9df95413a841e06.tar.gz
redmine-e6f2e3385684ba95167a6728c9df95413a841e06.zip
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
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/plugin_loader_test.rb3
-rw-r--r--test/unit/lib/redmine/plugin_test.rb3
2 files changed, 3 insertions, 3 deletions
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