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