It looks like you can run rails3 - Rails3 switched to Rack :: test, so the syntax is different. You pass an environment hash to set request variables, such as headers.
Try something like:
path = "/diary/people/1/entries.xml"
params = {:diary_entry => {
:drink_product_id => 4,
:drink_amount_id => 1,
:quantity => 3}
env=Hash.new
env["CONTENT_TYPE"] = "application/json"
env["ACCEPT"] = "application/json"
env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("someone@somemail.com:qwerty123")
get(end_point, params, env)
This can work too, but it can only be a sinatra:
get '/protected', {}, {'HTTP_AUTHORIZATION' => encode_credentials('go', 'away')}
Sinatra Verification Certificate