Sha256: 7d3278bd149e970da36449cf92c683707cf89e2996e410ce0697ebfecf374278
Contents?: true
Size: 605 Bytes
Versions: 15
Compression:
Stored size: 605 Bytes
Contents
module Features module SessionHelpers def sign_in(user = nil, pwd = nil) default_pwd = 'Passw0rd' visitor = user || create( :user, email: 'orbanbotond@gmail.com', password: default_pwd, password_confirmation: default_pwd) password = pwd || default_pwd visit mtdevise.new_user_session_path fill_in "user_email", with: visitor.email fill_in 'user_password', with: password click_on 'Sign-In' end def logout click_on 'settings_dropdown' sleep(2) click_on 'Logout' end end end RSpec.configure do |config| config.include Features::SessionHelpers, type: :feature end
Version data entries
15 entries across 15 versions & 1 rubygems