Module: Draper::DeviseHelper

Included in:
TestCase::Behavior
Defined in:
lib/draper/test/devise_helper.rb

Instance Method Summary collapse

Instance Method Details

#sign_in(resource_or_scope, resource = nil) ⇒ Object



3
4
5
6
# File 'lib/draper/test/devise_helper.rb', line 3

def (resource_or_scope, resource = nil)
  scope = Devise::Mapping.find_scope!(resource_or_scope)
  _stub_current_scope scope, resource || resource_or_scope
end

#sign_out(resource_or_scope) ⇒ Object



8
9
10
11
# File 'lib/draper/test/devise_helper.rb', line 8

def sign_out(resource_or_scope)
  scope = Devise::Mapping.find_scope!(resource_or_scope)
  _stub_current_scope scope, nil
end