spec/support/helpers/feature_helpers.rb
# Creates a user account and signs the user in. Used for setup for
# administrative specs.
Creates a user account and signs the user in. Used for setup for
administrative specs.
Creates a user account and signs the user in . Used for setup for administrative specs .
def sign_in_as_admin
    create(:user, email: 'admin@example.com', password: 'password')
    visit new_user_session_path
    within 'form#new_user' do
      fill_in 'Email', with: 'admin@example.com'
      fill_in 'Password', with: 'password'
    end
    click_button 'Log in'
  end
def sign_in_as_admin create ( :user , email : 'admin@example.com' , password : 'password' ) visit new_user_session_path within 'form#new_user' do fill_in 'Email' , with : 'admin@example.com' fill_in 'Password' , with : 'password' end click_button 'Log in' end
Creates a user account and signs the user in.
Creates a user account and signs the user in .