Module: Challah::Testing

Included in:
ActionController::TestCase
Defined in:
lib/challah/test.rb

Instance Method Summary collapse

Instance Method Details

#signin_as(user) ⇒ Object Also known as: login_as

Sign the given user instance in



30
31
32
# File 'lib/challah/test.rb', line 30

def (user)
  Session.create!(user, nil, nil, user.class)
end

#signoutObject Also known as: logout

Sign the given user instance out



36
37
38
# File 'lib/challah/test.rb', line 36

def signout
  Session.destroy
end