Skip to content

Commit

Permalink
Fix change from MiniTest to Minitest
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms authored and evgeni committed Sep 13, 2023
1 parent 0ab628a commit 145adff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/definitions/checks/disk_performance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -47,7 +47,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')
Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion test/definitions/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/lib/concerns/upstream_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/backup_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/support/minitest_spec_context.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'minitest/spec'

module MiniTest
module Minitest
class Spec
class << self
alias context describe
Expand Down

0 comments on commit 145adff

Please sign in to comment.