Replace all raise ruby keyword with fail

This commit is contained in:
Thibault Jouan 2014-06-05 12:37:42 +00:00
parent 6a396ae8c0
commit 9eed0a8ef8
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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