class ShellMock::ExecMonkeyPatch
Public Instance Methods
method_name()
click to toggle source
# File lib/shell_mock/exec_monkey_patch.rb, line 8 def method_name :exec end
override(*args)
click to toggle source
# File lib/shell_mock/exec_monkey_patch.rb, line 12 def override(*args) env, command, options = SpawnArguments(*args) stub = StubRegistry.stub_matching(env, command, options) if stub stub.ran stub.side_effect.call __un_shell_mocked_exec(stub.to_oneliner) else if ShellMock.let_commands_run? __un_shell_mocked_exec(env, command, options) else raise NoStubSpecified.new(env, command, options) end end end