Skip to content

Instantly share code, notes, and snippets.

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

Daniyal Akhlaq IMDaniyal

🏠
Working from home
  • UNEP-WCMC
  • Cambridge
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
#