mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
group methods defined in the current scope
This commit is contained in:
parent
cb1d6c4684
commit
dfcb342a8f
2 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ module Devise
|
|||
opts[:contains].map! { |m| ":#{m}" }
|
||||
mappings = "[#{ opts[:contains].join(',') }]"
|
||||
|
||||
ActionController::Base.class_eval <<-METHODS, __FILE__, __LINE__ + 1
|
||||
class_eval <<-METHODS, __FILE__, __LINE__ + 1
|
||||
def authenticate_#{group_name}!(favourite=nil, opts={})
|
||||
unless #{group_name}_signed_in?
|
||||
mappings = #{mappings}
|
||||
|
|
|
@ -51,7 +51,7 @@ class HelpersTest < ActionController::TestCase
|
|||
end
|
||||
|
||||
test 'resources methods are not controller actions' do
|
||||
assert @controller.class.action_methods.empty?
|
||||
assert @controller.class.action_methods.delete_if { |m| m.include? 'commenter' }.empty?
|
||||
end
|
||||
|
||||
test 'require no authentication tests current mapping' do
|
||||
|
|
Loading…
Reference in a new issue