Skip to content

Instantly share code, notes, and snippets.

View martinstannard's full-sized avatar
🏠
working from home

Martin Stannard martinstannard

🏠
working from home
View GitHub Profile
it "requires http basic_auth" do
@credentials = ActionController::HttpAuthentication::Basic.encode_credentials("login", "password")
request.env['HTTP_AUTHORIZATION'] = @credentials
get 'index'
# specs here
end