Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cli/kit/support/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module Kit
module System
class << self
alias_method :original_system, :system
def system(cmd, *a, sudo: false, env: {}, stdin: nil, **kwargs)
def system(cmd, *a, sudo: false, env: {}, stdin: nil, **kwargs, &block)
a.unshift(cmd)
expected_command = expected_command(a, sudo: sudo, env: env)

Expand All @@ -69,7 +69,7 @@ def system(cmd, *a, sudo: false, env: {}, stdin: nil, **kwargs)
# Otherwise handle the command
if expected_command[:allow]
uself = self #: as untyped
uself.original_system(*a, sudo: sudo, env: env, **kwargs)
uself.original_system(*a, sudo: sudo, env: env, **kwargs, &block)
else
FakeSuccess.new(expected_command[:success])
end
Expand Down
Loading