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 committed Aug 3, 2023
1 parent 6810be6 commit d3afabb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/definitions/checks/disk_performance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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 @@ -49,7 +49,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_method :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 @@ -59,7 +59,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_method :context, :describe
Expand Down

0 comments on commit d3afabb

Please sign in to comment.