diff --git a/test/definitions/checks/disk_performance_test.rb b/test/definitions/checks/disk_performance_test.rb index b5f6e188d..ece452d53 100644 --- a/test/definitions/checks/disk_performance_test.rb +++ b/test/definitions/checks/disk_performance_test.rb @@ -24,7 +24,7 @@ end check_disk_performance.stubs(:check_only_single_device?).returns(true) - io_obj = MiniTest::Mock.new + io_obj = Minitest::Mock.new io_obj.expect(:read_speed, 90) io_obj.expect(:slow_disk_error_msg, 'Slow disk') io_obj.expect(:name, '/dev/sda') @@ -74,7 +74,7 @@ check_disk_performance.stubs(:check_only_single_device?).returns(true) - io_obj = MiniTest::Mock.new + io_obj = Minitest::Mock.new 2.times { io_obj.expect(:read_speed, slow_speed) } io_obj.expect(:slow_disk_error_msg, err_msg) io_obj.expect(:name, '/dev/sda') diff --git a/test/definitions/test_helper.rb b/test/definitions/test_helper.rb index c16c335f2..00df82df7 100644 --- a/test/definitions/test_helper.rb +++ b/test/definitions/test_helper.rb @@ -50,7 +50,7 @@ def assert_stdout(expected_output) alias run_procedure run_step def mock_with_spinner(definition) - mock_spinner = MiniTest::Mock.new + mock_spinner = Minitest::Mock.new mock_spinner.expect(:update, nil) definition.stubs(:with_spinner).returns(mock_spinner) diff --git a/test/lib/concerns/upstream_test.rb b/test/lib/concerns/upstream_test.rb index 7e3001931..c5de19793 100644 --- a/test/lib/concerns/upstream_test.rb +++ b/test/lib/concerns/upstream_test.rb @@ -150,7 +150,7 @@ def stub_unknown(fake_system) it 'returns repositories matching with regex' do stub_el(katello_system) katello_repo_url = 'https://yum.theforeman.org/katello/4.5/katello/el8/x86_64/' - repository_manager_obj = MiniTest::Mock.new + repository_manager_obj = Minitest::Mock.new system_repositories = { 'non_foreman' => 'abc.example.com', 'katello' => katello_repo_url } repository_manager_obj.expect(:enabled_repos, system_repositories) diff --git a/test/lib/utils/backup_test.rb b/test/lib/utils/backup_test.rb index 0b9647d82..6f6d17783 100644 --- a/test/lib/utils/backup_test.rb +++ b/test/lib/utils/backup_test.rb @@ -111,7 +111,7 @@ def assume_feature_absent(label) end def feature_with_local_method(label, return_value) - fake_feature = MiniTest::Mock.new + fake_feature = Minitest::Mock.new ret_hash = { 'host' => 'abc.example.com' } fake_feature.expect(:configuration, ret_hash) fake_feature.expect(:local?, return_value) diff --git a/test/support/minitest_spec_context.rb b/test/support/minitest_spec_context.rb index 52771ad77..a38cbfadc 100644 --- a/test/support/minitest_spec_context.rb +++ b/test/support/minitest_spec_context.rb @@ -1,6 +1,6 @@ require 'minitest/spec' -module MiniTest +module Minitest class Spec class << self alias context describe