Skip to content

Instantly share code, notes, and snippets.

View rossmari's full-sized avatar
🏠
Working from home

Roman Buzhenko rossmari

🏠
Working from home
  • Russian Federation, Krasnoyarsk
View GitHub Profile
@mattconnolly
mattconnolly / gist:4158961
Created November 28, 2012 04:04
RSpec basic authentication helper module for request and controller specs
module AuthHelper
def http_login
user = 'username'
pw = 'password'
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw)
end
end
module AuthRequestHelper
#