instance method
helper_method
Ruby on Rails 8.1.2
Since v3.0.20Signature
helper_method(*methods)
No documentation comment.
Parameters
-
methodsrest
Source
# File actionview/lib/action_view/test_case.rb, line 219
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}(...) # def current_user(...)
_test_case.send(:'#{method}', ...) # _test_case.send(:'current_user', ...)
end # end
end_eval
end
end
Defined in actionview/lib/action_view/test_case.rb line 219
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::TestCase::Behavior::ClassMethods