From 94890696038ad3beeb5088e872c0009bd7d83f55 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 26 Feb 2023 11:00:48 +0100 Subject: [PATCH] do not use require_relative for test helper: this breaks file loading with tests --- test/functional/account_controller_test.rb | 2 +- test/functional/additionals_assign_to_me_controller_test.rb | 2 +- test/functional/additionals_change_status_controller_test.rb | 2 +- test/functional/additionals_macros_controller_test.rb | 2 +- test/functional/admin_controller_test.rb | 2 +- test/functional/auto_completes_controller_test.rb | 2 +- test/functional/dashboard_async_blocks_controller_test.rb | 2 +- test/functional/dashboards_controller_test.rb | 2 +- test/functional/issues_controller_test.rb | 2 +- test/functional/projects_controller_test.rb | 2 +- test/functional/reports_controller_test.rb | 2 +- test/functional/users_controller_test.rb | 2 +- test/functional/welcome_controller_test.rb | 2 +- test/functional/wiki_controller_test.rb | 2 +- test/integration/api_test/issues_test.rb | 2 +- test/integration/api_test/projects_test.rb | 2 +- test/integration/common_views_test.rb | 2 +- test/integration/library_test.rb | 2 +- test/integration/routing_test.rb | 2 +- test/unit/additionals_fontawesome_test.rb | 2 +- test/unit/additionals_info_test.rb | 2 +- test/unit/additionals_journal_test.rb | 2 +- test/unit/additionals_macro_test.rb | 2 +- test/unit/additionals_plugin_test.rb | 2 +- test/unit/additionals_test.rb | 2 +- test/unit/core_ext_test.rb | 2 +- test/unit/dashboard_content_test.rb | 2 +- test/unit/dashboard_test.rb | 2 +- test/unit/entity_method_test.rb | 2 +- test/unit/helpers/global_helper_test.rb | 2 +- test/unit/i18n_test.rb | 2 +- test/unit/issue_test.rb | 2 +- test/unit/project_test.rb | 2 +- test/unit/query_test.rb | 2 +- test/unit/redmine_access_control_test.rb | 2 +- test/unit/redmine_plugin_kit_loader_test.rb | 2 +- test/unit/role_test.rb | 2 +- test/unit/time_entry_test.rb | 2 +- test/unit/user_test.rb | 2 +- test/unit/wiki_formating/common_mark_test.rb | 2 +- test/unit/wiki_formating/markdown_test.rb | 2 +- test/unit/wiki_formating/textile_test.rb | 2 +- test/unit/wiki_page_test.rb | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index a6095414..07fafbe3 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AccountControllerTest < Additionals::ControllerTest fixtures :users, :groups_users, :email_addresses, :user_preferences, diff --git a/test/functional/additionals_assign_to_me_controller_test.rb b/test/functional/additionals_assign_to_me_controller_test.rb index c49e0797..1a5572e2 100644 --- a/test/functional/additionals_assign_to_me_controller_test.rb +++ b/test/functional/additionals_assign_to_me_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsAssignToMeControllerTest < Additionals::ControllerTest fixtures :projects, diff --git a/test/functional/additionals_change_status_controller_test.rb b/test/functional/additionals_change_status_controller_test.rb index 6c0b3025..86a1053d 100644 --- a/test/functional/additionals_change_status_controller_test.rb +++ b/test/functional/additionals_change_status_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsChangeStatusControllerTest < Additionals::ControllerTest fixtures :projects, diff --git a/test/functional/additionals_macros_controller_test.rb b/test/functional/additionals_macros_controller_test.rb index 080ab067..fe42158b 100644 --- a/test/functional/additionals_macros_controller_test.rb +++ b/test/functional/additionals_macros_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsMacrosControllerTest < Additionals::ControllerTest fixtures :projects, diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index b48001f1..7ed8777a 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdminControllerTest < Additionals::ControllerTest fixtures :users, :email_addresses, :roles diff --git a/test/functional/auto_completes_controller_test.rb b/test/functional/auto_completes_controller_test.rb index 96fd9513..971e7b7b 100644 --- a/test/functional/auto_completes_controller_test.rb +++ b/test/functional/auto_completes_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AutoCompletesControllerTest < Additionals::ControllerTest fixtures :projects, :email_addresses, diff --git a/test/functional/dashboard_async_blocks_controller_test.rb b/test/functional/dashboard_async_blocks_controller_test.rb index 4829b95b..b81aa793 100644 --- a/test/functional/dashboard_async_blocks_controller_test.rb +++ b/test/functional/dashboard_async_blocks_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class DashboardAsyncBlocksControllerTest < Additionals::ControllerTest fixtures :users, :email_addresses, :roles, diff --git a/test/functional/dashboards_controller_test.rb b/test/functional/dashboards_controller_test.rb index e79731ba..d518bd21 100644 --- a/test/functional/dashboards_controller_test.rb +++ b/test/functional/dashboards_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class DashboardsControllerTest < Additionals::ControllerTest fixtures :projects, diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 1a3fa2a1..1fa86804 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class IssuesControllerTest < Additionals::ControllerTest fixtures :users, :email_addresses, :roles, diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 939f58a5..89c09922 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class ViewDashboardTopRenderOn < Redmine::Hook::ViewListener render_on :view_dashboard_top, inline: '
Example text
' diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb index dc8f34ea..65b3349d 100644 --- a/test/functional/reports_controller_test.rb +++ b/test/functional/reports_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class ReportsControllerTest < Additionals::ControllerTest fixtures :users, :groups_users, :email_addresses, :user_preferences, diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 1ff6b43f..a9675ee8 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class ViewUsersShowContextualRenderOn < Redmine::Hook::ViewListener render_on :view_users_show_contextual, inline: '
Example text
' diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb index f757be2f..b3f4a1af 100644 --- a/test/functional/welcome_controller_test.rb +++ b/test/functional/welcome_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class ViewWelcomeIndexTopRenderOn < Redmine::Hook::ViewListener render_on :view_welcome_index_top, inline: '
Example text
' diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 3266d342..3197a43c 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class WikiControllerTest < Additionals::ControllerTest fixtures :projects, diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 079ec086..56156d09 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../test_helper' +require File.expand_path '../../../test_helper', __FILE__ module ApiTest class IssuesTest < Additionals::ApiTest diff --git a/test/integration/api_test/projects_test.rb b/test/integration/api_test/projects_test.rb index ac89534c..1f79fe7c 100644 --- a/test/integration/api_test/projects_test.rb +++ b/test/integration/api_test/projects_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../test_helper' +require File.expand_path '../../../test_helper', __FILE__ module ApiTest class ProjectsTest < Additionals::ApiTest diff --git a/test/integration/common_views_test.rb b/test/integration/common_views_test.rb index fd307939..1313af58 100644 --- a/test/integration/common_views_test.rb +++ b/test/integration/common_views_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class CommonViewsTest < Additionals::IntegrationTest fixtures :projects, diff --git a/test/integration/library_test.rb b/test/integration/library_test.rb index 7bab382b..37b709fb 100644 --- a/test/integration/library_test.rb +++ b/test/integration/library_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class JavascriptLibraryTest < Additionals::IntegrationTest fixtures :projects, diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index ca2196b7..b704f91f 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class RoutingTest < Redmine::RoutingTest def test_issue_assign_to_me diff --git a/test/unit/additionals_fontawesome_test.rb b/test/unit/additionals_fontawesome_test.rb index 1d52587f..5de8269f 100644 --- a/test/unit/additionals_fontawesome_test.rb +++ b/test/unit/additionals_fontawesome_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsFontAwesomeTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/additionals_info_test.rb b/test/unit/additionals_info_test.rb index f53801b7..5229b386 100644 --- a/test/unit/additionals_info_test.rb +++ b/test/unit/additionals_info_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsInfoTest < Additionals::TestCase def test_system_infos diff --git a/test/unit/additionals_journal_test.rb b/test/unit/additionals_journal_test.rb index efc76dcf..2a91d86b 100644 --- a/test/unit/additionals_journal_test.rb +++ b/test/unit/additionals_journal_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsJournalTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/additionals_macro_test.rb b/test/unit/additionals_macro_test.rb index da989225..6f7106f4 100644 --- a/test/unit/additionals_macro_test.rb +++ b/test/unit/additionals_macro_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsMacroTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/additionals_plugin_test.rb b/test/unit/additionals_plugin_test.rb index 51bfa60a..f89c9a59 100644 --- a/test/unit/additionals_plugin_test.rb +++ b/test/unit/additionals_plugin_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsPluginTest < Additionals::TestCase def test_known_plugin diff --git a/test/unit/additionals_test.rb b/test/unit/additionals_test.rb index 9f622c08..05ced6c7 100644 --- a/test/unit/additionals_test.rb +++ b/test/unit/additionals_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class AdditionalsTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/core_ext_test.rb b/test/unit/core_ext_test.rb index 020754aa..b60e6925 100644 --- a/test/unit/core_ext_test.rb +++ b/test/unit/core_ext_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class CoreExtTest < Additionals::TestCase def test_strip_split_with_default_sep diff --git a/test/unit/dashboard_content_test.rb b/test/unit/dashboard_content_test.rb index b05cecad..8048224a 100644 --- a/test/unit/dashboard_content_test.rb +++ b/test/unit/dashboard_content_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class DashboardContentTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/dashboard_test.rb b/test/unit/dashboard_test.rb index 7742cd69..69ad9123 100644 --- a/test/unit/dashboard_test.rb +++ b/test/unit/dashboard_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class DashboardTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/entity_method_test.rb b/test/unit/entity_method_test.rb index af298c8c..580c29d4 100644 --- a/test/unit/entity_method_test.rb +++ b/test/unit/entity_method_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class EntityMethodTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/helpers/global_helper_test.rb b/test/unit/helpers/global_helper_test.rb index db9c1c13..422f18d8 100644 --- a/test/unit/helpers/global_helper_test.rb +++ b/test/unit/helpers/global_helper_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../test_helper' +require File.expand_path '../../../test_helper', __FILE__ class GlobalHelperTest < Redmine::HelperTest include Additionals::Helpers diff --git a/test/unit/i18n_test.rb b/test/unit/i18n_test.rb index 178b3672..e4f4a412 100644 --- a/test/unit/i18n_test.rb +++ b/test/unit/i18n_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class I18nTest < Additionals::TestCase include Redmine::I18n diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 7d31420c..1861b688 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class IssueTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index 26edd85d..b1a4a5bb 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class ProjectTest < Additionals::TestCase fixtures :projects, :trackers, :issue_statuses, :issues, diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 24af1252..11d3a799 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class QueryTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/redmine_access_control_test.rb b/test/unit/redmine_access_control_test.rb index 6a530884..81543dcc 100644 --- a/test/unit/redmine_access_control_test.rb +++ b/test/unit/redmine_access_control_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class RedmineAccessControlTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/redmine_plugin_kit_loader_test.rb b/test/unit/redmine_plugin_kit_loader_test.rb index aa2c271c..986221db 100644 --- a/test/unit/redmine_plugin_kit_loader_test.rb +++ b/test/unit/redmine_plugin_kit_loader_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class RedminePluginKitLoaderTest < Additionals::TestCase def setup diff --git a/test/unit/role_test.rb b/test/unit/role_test.rb index e8dec0d0..2b48691a 100644 --- a/test/unit/role_test.rb +++ b/test/unit/role_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class RoleTest < Additionals::TestCase fixtures :projects, :users, :members, :member_roles, :roles, diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb index 59887ed0..612db637 100644 --- a/test/unit/time_entry_test.rb +++ b/test/unit/time_entry_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class TimeEntryTest < Additionals::TestCase fixtures :users, :email_addresses, diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index f6beb4ec..b29ba468 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class UserTest < Additionals::TestCase fixtures :users, :groups_users, :email_addresses, diff --git a/test/unit/wiki_formating/common_mark_test.rb b/test/unit/wiki_formating/common_mark_test.rb index fe293dc5..d1463e5b 100644 --- a/test/unit/wiki_formating/common_mark_test.rb +++ b/test/unit/wiki_formating/common_mark_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../test_helper' +require File.expand_path '../../../test_helper', __FILE__ module WikiFormatting class CommonMarkTest < ActiveSupport::TestCase diff --git a/test/unit/wiki_formating/markdown_test.rb b/test/unit/wiki_formating/markdown_test.rb index a6fba900..26fe4afa 100644 --- a/test/unit/wiki_formating/markdown_test.rb +++ b/test/unit/wiki_formating/markdown_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../test_helper' +require File.expand_path '../../../test_helper', __FILE__ module WikiFormatting class MarkdownTest < ActionView::TestCase diff --git a/test/unit/wiki_formating/textile_test.rb b/test/unit/wiki_formating/textile_test.rb index 57aeaf09..a73035e7 100644 --- a/test/unit/wiki_formating/textile_test.rb +++ b/test/unit/wiki_formating/textile_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../test_helper' +require File.expand_path '../../../test_helper', __FILE__ require 'digest/md5' module WikiFormatting diff --git a/test/unit/wiki_page_test.rb b/test/unit/wiki_page_test.rb index bc474eaa..7cfdba57 100644 --- a/test/unit/wiki_page_test.rb +++ b/test/unit/wiki_page_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../test_helper' +require File.expand_path '../../test_helper', __FILE__ class WikiPageTest < Additionals::TestCase fixtures :projects, :users, :roles,