diff --git a/lib/producer/core/cli.rb b/lib/producer/core/cli.rb index d7d6eb3..8d25dda 100644 --- a/lib/producer/core/cli.rb +++ b/lib/producer/core/cli.rb @@ -46,7 +46,7 @@ module Producer m end - raise ArgumentError unless arguments.any? + fail ArgumentError unless arguments.any? end def run diff --git a/lib/producer/core/remote.rb b/lib/producer/core/remote.rb index d875e91..f32c18d 100644 --- a/lib/producer/core/remote.rb +++ b/lib/producer/core/remote.rb @@ -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 diff --git a/lib/producer/core/testing/mock_remote.rb b/lib/producer/core/testing/mock_remote.rb index 04f559b..9348098 100644 --- a/lib/producer/core/testing/mock_remote.rb +++ b/lib/producer/core/testing/mock_remote.rb @@ -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