Sha256: 7b27b36c0901a408118f3e370d507c8352c06208494e20f97f678e72a90e9b01
Contents?: true
Size: 798 Bytes
Versions: 4
Compression:
Stored size: 798 Bytes
Contents
module Features # Helpers for feature tests module FeatureHelpers def sign_in_with(email, password) visit sign_in_path fill_in 'session_email', with: email fill_in 'session_password', with: password click_button 'Sign in' end def sign_out within '#header' do click_link I18n.t('layouts.application.sign_out') end end def expect_user_to_be_signed_in visit root_path expect(page).to have_link 'Sign out' end def expect_page_to_display_sign_in_error expect(page).to have_content 'Invalid id or password' end def expect_user_to_be_signed_out expect(page).to have_content 'Sign in' end end end RSpec.configure do |config| config.include Features::FeatureHelpers, type: :feature end
Version data entries
4 entries across 4 versions & 1 rubygems