Sha256: e1ffe82cdc5c4b481c80fb01d2024025d3900e3a7bbabc0c1554e94b391795fe
Contents?: true
Size: 763 Bytes
Versions: 4
Compression:
Stored size: 763 Bytes
Contents
# spec/support/features/session_helpers.rb module Features module SessionHelpers def sign_up_with(email, password) Capybara.exact = true visit new_user_registration_path fill_in 'Email', with: email fill_in 'Password', with: password fill_in 'Password confirmation', with: password click_button 'Sign up' end def sign_in(who = :user) user = if who.instance_of?(User) who else FactoryGirl.build(:user).tap do |u| u.save! end end visit new_user_session_path fill_in 'Email', with: user.email fill_in 'Password', with: user.password click_button 'Sign in' expect(page).to_not have_text 'Invalid email or password.' end end end
Version data entries
4 entries across 4 versions & 1 rubygems