Sha256: 3b4562b9ccdbe234f11a79087ee731f9c271e46bbfe5c8f265e2d756cc7c131c
Contents?: true
Size: 380 Bytes
Versions: 25
Compression:
Stored size: 380 Bytes
Contents
module SpecLoginHelper def sign_in(user) request.cookies[:remember_token] = user.remember_token self.current_user = user end def current_user @current_user ||= User.users.find_by_remember_token(request.cookies[:remember_token]) end def current_user=(user) @current_user = user end end RSpec.configure do |config| config.include SpecLoginHelper end
Version data entries
25 entries across 25 versions & 1 rubygems