Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rails_helper'
- feature "user admin page" do
- scenerio "abc..." do
- user = create(:user)
- login_with(user.email)
- ..
- ..
- end
- end
- RSpec.configure do |config|
- config.include Features::SessionHelpers, type: feature
- end
- module Features
- module SessionHelpers
- def login_with(email, password = "Password123")
- visit session_login_path
- fill_in "login_form[email]", with: email
- fill_in "login_form[password]", with: password
- click_button "Sign In"
- end
- end
- end
- NoMethodError:
- undefined method `login_with' for #<RSpec::Examp...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement