Methods
Attributes
| [W] | helper_class |
Instance Public methods
Source: show
# File actionpack/lib/action_view/test_case.rb, line 56 def determine_default_helper_class(name) mod = name.sub(/Test$/, '').constantize mod.is_a?(Class) ? nil : mod rescue NameError nil end
Source: show
# File actionpack/lib/action_view/test_case.rb, line 76 def helper_class @helper_class ||= determine_default_helper_class(name) end
Source: show
# File actionpack/lib/action_view/test_case.rb, line 63 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) _test_case.send(%(#{method}), *args, &block) # _test_case.send(%(current_user), *args, &block) end # end " end end
Source: show
# File actionpack/lib/action_view/test_case.rb, line 80 def new(*) include_helper_modules! super end
Source: show
# File actionpack/lib/action_view/test_case.rb, line 52 def tests(helper_class) self.helper_class = helper_class end