diff --git a/activesupport/test/logger_test.rb b/activesupport/test/logger_test.rb index 5efbd10a7d..773b0daa1d 100644 --- a/activesupport/test/logger_test.rb +++ b/activesupport/test/logger_test.rb @@ -5,6 +5,7 @@ require "multibyte_test_helpers" require "stringio" require "fileutils" require "tempfile" +require "tmpdir" require "concurrent/atomics" class LoggerTest < ActiveSupport::TestCase diff --git a/activesupport/test/multibyte_conformance_test.rb b/activesupport/test/multibyte_conformance_test.rb index 748e8d16e1..a704505fc6 100644 --- a/activesupport/test/multibyte_conformance_test.rb +++ b/activesupport/test/multibyte_conformance_test.rb @@ -3,15 +3,10 @@ require "abstract_unit" require "multibyte_test_helpers" -require "fileutils" -require "open-uri" -require "tmpdir" - class MultibyteConformanceTest < ActiveSupport::TestCase include MultibyteTestHelpers UNIDATA_FILE = "/NormalizationTest.txt" - FileUtils.mkdir_p(CACHE_DIR) RUN_P = begin Downloader.download(UNIDATA_URL + UNIDATA_FILE, CACHE_DIR + UNIDATA_FILE) rescue diff --git a/activesupport/test/multibyte_grapheme_break_conformance_test.rb b/activesupport/test/multibyte_grapheme_break_conformance_test.rb index fac74cd80f..61b171a8d4 100644 --- a/activesupport/test/multibyte_grapheme_break_conformance_test.rb +++ b/activesupport/test/multibyte_grapheme_break_conformance_test.rb @@ -3,10 +3,6 @@ require "abstract_unit" require "multibyte_test_helpers" -require "fileutils" -require "open-uri" -require "tmpdir" - class MultibyteGraphemeBreakConformanceTest < ActiveSupport::TestCase include MultibyteTestHelpers diff --git a/activesupport/test/multibyte_normalization_conformance_test.rb b/activesupport/test/multibyte_normalization_conformance_test.rb index 1173a94e81..3674ea44f3 100644 --- a/activesupport/test/multibyte_normalization_conformance_test.rb +++ b/activesupport/test/multibyte_normalization_conformance_test.rb @@ -3,10 +3,6 @@ require "abstract_unit" require "multibyte_test_helpers" -require "fileutils" -require "open-uri" -require "tmpdir" - class MultibyteNormalizationConformanceTest < ActiveSupport::TestCase include MultibyteTestHelpers diff --git a/activesupport/test/multibyte_test_helpers.rb b/activesupport/test/multibyte_test_helpers.rb index f7cf993100..98f36aa939 100644 --- a/activesupport/test/multibyte_test_helpers.rb +++ b/activesupport/test/multibyte_test_helpers.rb @@ -1,5 +1,9 @@ # frozen_string_literal: true +require "fileutils" +require "open-uri" +require "tmpdir" + module MultibyteTestHelpers class Downloader def self.download(from, to)