module AuthenticationHelpers def sign_in_as!(user) visit '/login' fill_in 'Email', with: user.email fill_in 'Password', with: 'secret' click_button 'Log in' end end RSpec.configure do |config| config.include AuthenticationHelpers, type: :feature config.include Rack::Test::Methods, type: :feature end