I would like to implement a retry for a number of times if the server is unavailable at that time!. Is possible?.
require 'httparty'
require 'pry'
require_relative '../../env.rb'
RSpec.describe 'Validar a api de usuários' do
it 'Deve retornar 200 para API DRIVE THRU' do
response = HttParty.get("#{URLS['drive_thru']}/v1/health/live")
expect(response.code).to eql(200)
expect(response.parsed_response).to be_nil
end
end