Methods

Attributes

[W] helper_class

Instance Public methods

determine_default_helper_class(name)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 68
        def determine_default_helper_class(name)
          determine_constant_from_test_name(name) do |constant|
            Module === constant && !(Class === constant)
          end
        end
🔎 See on GitHub

helper_class()

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 88
        def helper_class
          @helper_class ||= determine_default_helper_class(name)
        end
🔎 See on GitHub

helper_method(*methods)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 74
        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}') if respond_to?(:ruby2_keywords, true)
            end_eval
          end
        end
🔎 See on GitHub

new(*)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 92
        def new(*)
          include_helper_modules!
          super
        end
🔎 See on GitHub

tests(helper_class)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 59
        def tests(helper_class)
          case helper_class
          when String, Symbol
            self.helper_class = "#{helper_class.to_s.underscore}_helper".camelize.safe_constantize
          when Module
            self.helper_class = helper_class
          end
        end
🔎 See on GitHub