class Rack::Test::Session
def basic_authorize(username, password)
Example:
included in subsequent requests in the HTTP_AUTHORIZATION header.
Set the username and password for HTTP Basic authorization, to be
def basic_authorize(username, password) encoded_login = ["#{username}:#{password}"].pack('m0') header('Authorization', "Basic #{encoded_login}") end