Replace all raise ruby keyword with fail
This commit is contained in:
parent
6a396ae8c0
commit
9eed0a8ef8
@ -46,7 +46,7 @@ module Producer
|
|||||||
m
|
m
|
||||||
end
|
end
|
||||||
|
|
||||||
raise ArgumentError unless arguments.any?
|
fail ArgumentError unless arguments.any?
|
||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
|
@ -32,7 +32,7 @@ module Producer
|
|||||||
|
|
||||||
ch.on_request 'exit-status' do |c, data|
|
ch.on_request 'exit-status' do |c, data|
|
||||||
exit_status = data.read_long
|
exit_status = data.read_long
|
||||||
raise RemoteCommandExecutionError, command if exit_status != 0
|
fail RemoteCommandExecutionError, command if exit_status != 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,7 @@ module Producer
|
|||||||
module Testing
|
module Testing
|
||||||
class MockRemote < Remote
|
class MockRemote < Remote
|
||||||
def session
|
def session
|
||||||
raise 'no session for mock remote!'
|
fail 'no session for mock remote!'
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute(command, output = '')
|
def execute(command, output = '')
|
||||||
@ -16,9 +16,9 @@ module Producer
|
|||||||
when 'true'
|
when 'true'
|
||||||
output << ''
|
output << ''
|
||||||
when 'false'
|
when 'false'
|
||||||
raise RemoteCommandExecutionError
|
fail RemoteCommandExecutionError
|
||||||
when 'type'
|
when 'type'
|
||||||
raise RemoteCommandExecutionError unless %w[
|
fail RemoteCommandExecutionError unless %w[
|
||||||
echo
|
echo
|
||||||
true
|
true
|
||||||
false
|
false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user