test/cask/artifact/shared_examples/uninstall_zap: fix for Ruby 3.2+

This commit is contained in:
Bo Anderson 2024-05-17 01:25:56 +01:00
parent bde9afa70e
commit 7452350919
No known key found for this signature in database

View File

@ -314,8 +314,8 @@ RSpec.shared_examples "#uninstall_phase or #zap_phase" do
before do
allow_any_instance_of(Cask::Artifact::AbstractUninstall).to receive(:trash_paths)
.and_wrap_original do |method, *args|
method.call(*args).tap do |trashed, _|
.and_wrap_original do |method, *args, **kwargs|
method.call(*args, **kwargs).tap do |trashed, _|
FileUtils.rm_r trashed
end
end