Sha256: 8c22f4bd1a9ad0a4a04aca3daab8feffe16d010ff36fcf7a4b258fa3d0ef88fc
Contents?: true
Size: 422 Bytes
Versions: 16
Compression:
Stored size: 422 Bytes
Contents
module ApplicationHelpers def login_view_as(role=:user) user = Factory(role) fill_in 'user_email', :with => user.email fill_in 'user_password', :with => user.password click_button 'Sign in' end def login_controller_as(role=:user) user = Factory(role) #user.confirm! # or set a confirmed_at inside the factory. Only necessary if you are using the confirmable module sign_in user end end
Version data entries
16 entries across 16 versions & 2 rubygems