module Devise::Test::IntegrationHelpers
def sign_in(resource, scope: nil)
* +scope+ - An optional +Symbol+ with the scope where the resource
* +resource+ - The resource that should be authenticated
operation through +Devise::SessionsController#create+.
Signs in a specific resource, mimicking a successful sign in
def sign_in(resource, scope: nil) scope ||= Devise::Mapping.find_scope!(resource) login_as(resource, scope: scope) end