lib/generators/clearance/specs/templates/support/features/clearance_helpers.rb in clearance-1.5.0 vs lib/generators/clearance/specs/templates/support/features/clearance_helpers.rb in clearance-1.5.1

- old
+ new

@@ -6,11 +6,11 @@ click_button I18n.t("helpers.submit.password.submit") end def sign_in password = "password" - user = create(:user, password: password) + user = FactoryGirl.create(:user, password: password) sign_in_with user.email, password end def sign_in_with(email, password) visit sign_in_path @@ -28,22 +28,25 @@ fill_in "user_email", with: email fill_in "user_password", with: password click_button I18n.t("helpers.submit.user.create") end - def user_should_be_signed_in + def expect_user_to_be_signed_in visit root_path expect(page).to have_button I18n.t("layouts.application.sign_out") end - def user_should_be_signed_out + def expect_user_to_be_signed_out expect(page).to have_content I18n.t("layouts.application.sign_in") end def user_with_reset_password - user = create(:user) + user = FactoryGirl.create(:user) reset_password_for user.email user.reload end - end +end + +RSpec.configure do |config| + config.include Features::ClearanceHelpers, type: :feature end