Sha256: 0eb08ab059174b5d8d74c930fe4f4908ee493b6437e0e801151a47720a69235f
Contents?: true
Size: 450 Bytes
Versions: 27
Compression:
Stored size: 450 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 def sign_in_user @user = create(:user) sign_in @user end end RSpec.configure do |config| config.include SpecLoginHelper end
Version data entries
27 entries across 27 versions & 1 rubygems