Sha256: d29de195878123d802c816f6ef6fbc506f1109d13366e536786477159f8e09a3
Contents?: true
Size: 606 Bytes
Versions: 18
Compression:
Stored size: 606 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
18 entries across 18 versions & 1 rubygems