diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb
index 059aaca7d..87b57c7f2 100644
--- a/test/helpers/application_helper_test.rb
+++ b/test/helpers/application_helper_test.rb
@@ -22,7 +22,6 @@ require_relative '../test_helper'
class ApplicationHelperTest < Redmine::HelperTest
include ERB::Util
include AvatarsHelper
- include IconsHelper
def setup
super
@@ -2430,13 +2429,4 @@ class ApplicationHelperTest < Redmine::HelperTest
assert_equal({}, list_autofill_data_attributes)
end
end
-
- def pre_wrapper(text)
- icon = sprite_icon('copy-pre-content', size: 18)
- button_copy = l(:button_copy)
- '
'
- end
end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index a59f70c85..2c026ad11 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -342,12 +342,21 @@ module Redmine
class HelperTest < ActionView::TestCase
include Redmine::I18n
include Propshaft::Helper
+ include IconsHelper
def setup
super
User.current = nil
::I18n.locale = 'en'
end
+
+ def pre_wrapper(text)
+ icon = sprite_icon('copy-pre-content', size: 18)
+ ''
+ end
end
class ControllerTest < ActionController::TestCase
diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
index 57c6417ef..8c3011575 100644
--- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
@@ -23,7 +23,6 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
include ERB::Util
- include IconsHelper
extend ActionView::Helpers::SanitizeHelper::ClassMethods
def setup
@@ -627,15 +626,6 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
end
end
- def pre_wrapper(text)
- icon = sprite_icon('copy-pre-content', size: 18)
- button_copy = l(:button_copy)
- ''
- end
-
def test_recent_pages_macro_with_project_option_should_not_disclose_private_project
project = Project.find(5) # Private project
diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
index d0e26dcb4..5678067dd 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -21,8 +21,6 @@
require_relative '../../../../test_helper'
class Redmine::WikiFormatting::TextileFormatterTest < Redmine::HelperTest
- include IconsHelper
-
def setup
super
@formatter = Redmine::WikiFormatting::Textile::Formatter
@@ -825,13 +823,4 @@ class Redmine::WikiFormatting::TextileFormatterTest < Redmine::HelperTest
assert_equal expected, result.first, "section content did not match"
assert_equal ActiveSupport::Digest.hexdigest(expected), result.last, "section hash did not match"
end
-
- def pre_wrapper(text)
- icon = sprite_icon('copy-pre-content', size: 18)
- button_copy = l(:button_copy)
- ''
- end
end