Implement Testing::MockRemote#execute

This commit is contained in:
Thibault Jouan committed 2014-03-04 05:54:19 +00:00
1 parent b576604498
commit 85e3bf2eac
2 files changed
+41

No files matched your search

+14
View File
@@ -5,6 +5,20 @@ module Producer
def session
raise 'no session for mock remote!'
end
def execute(command)
tokens = command.split
program = tokens.shift
case program
when 'echo'
tokens.join ' '
when 'true'
''
when 'false'
raise RemoteCommandExecutionError
end
end
end
end
end