module Helpers def login(user) visit '/' fill_in "Email address", with: user.email_address fill_in "Password", with: user.password click_button "Sign in" end end RSpec.configure do |c| c.include Helpers end