instance method
helper_method
Ruby on Rails 7.0.10
Since v3.0.20Signature
helper_method(*methods)
No documentation comment.
Parameters
-
methodsrest
Source
# File actionview/lib/action_view/test_case.rb, line 78
def helper_method(*methods)
# Almost a duplicate from ActionController::Helpers
methods.flatten.each do |method|
_helpers_for_modification.module_eval <<~end_eval, __FILE__, __LINE__ + 1
def #{method}(*args, &block) # def current_user(*args, &block)
_test_case.send(:'#{method}', *args, &block) # _test_case.send(:'current_user', *args, &block)
end # end
ruby2_keywords(:'#{method}')
end_eval
end
end
Defined in actionview/lib/action_view/test_case.rb line 78
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::TestCase::Behavior::ClassMethods