Method: ActionView::TestCase::Behavior::ClassMethods#helper_method

Defined in:
lib/action_view/test_case.rb

#helper_method(*methods) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
# File 'lib/action_view/test_case.rb', line 73

def helper_method(*methods)
  # Almost a duplicate from ActionController::Helpers
  methods.flatten.each do |method|
    _helpers.module_eval "      def \#{method}(*args, &block)                    # def current_user(*args, &block)\n        _test_case.send(:'\#{method}', *args, &block)  #   _test_case.send(:'current_user', *args, &block)\n      end                                             # end\n      ruby2_keywords(:'\#{method}') if respond_to?(:ruby2_keywords, true)\n    end_eval\n  end\nend\n", __FILE__, __LINE__ + 1