From 7a6290c623847b0fd8ffa65c59dfb579d20b8601 Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Thu, 27 Nov 2025 12:03:22 -0700 Subject: [PATCH] Remove minitest dependency on i18n reload test Closes #3147 This test has had a few failures regarding its minitest version: https://github.com/faker-ruby/faker/pull/3073 https://github.com/faker-ruby/faker/pull/3144 To avoid having to change this everytime we bump minitest, and there's a failure caused by dependencies mismatches, let's just use Ruby's test/unit instead. --- test/test_i18n_reload.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/test_i18n_reload.rb b/test/test_i18n_reload.rb index e20c145e52..b86fa47048 100644 --- a/test/test_i18n_reload.rb +++ b/test/test_i18n_reload.rb @@ -9,23 +9,24 @@ def test_faker_i18n # and proper initialization of i18n. code = <<-RUBY require 'bundler/inline' + require 'test/unit' gemfile do source 'https://rubygems.org' - gem 'minitest' gem 'i18n' end - require 'minitest/autorun' require 'i18n' - class TestI18nLoad < Minitest::Test + class TestI18nLoad < Test::Unit::TestCase def test_faker_i18n I18n.available_locales = [:en] - refute_predicate I18n.backend, :initialized? + + refute I18n.backend.initialized? + I18n.translate('doesnt matter just triggering a lookup') - assert_predicate I18n.backend, :initialized? + assert I18n.backend.initialized? assert require File.expand_path('#{File.dirname(__FILE__)}/../lib/faker') @@ -37,6 +38,6 @@ def test_faker_i18n cmd = %( ruby -e "#{code}" ) output, status = Open3.capture2e(cmd) - assert_equal 0, status, output + assert_equal(0, status, output) end end