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

Defined in:
lib/action_view/test_case.rb

#helper_method(*methods) ⇒ Object



170
171
172
173
174
175
176
177
178
179
# File 'lib/action_view/test_case.rb', line 170

def helper_method(*methods)
  # Almost a duplicate from ActionController::Helpers
  methods.flatten.each do |method|
    _helpers_for_modification.module_eval "      def \#{method}(...)                    # def current_user(...)\n        _test_case.send(:'\#{method}', ...)  #   _test_case.send(:'current_user', ...)\n      end                                   # end\n    end_eval\n  end\nend\n", __FILE__, __LINE__ + 1