Class ActionView::TestCase
In: vendor/rails/actionpack/lib/action_view/test_case.rb
Parent: ActiveSupport::TestCase

Methods

Included Modules

ActionController::TestCase::Assertions ActionController::TestProcess ActionController::PolymorphicRoutes ActionController::RecordIdentifier ActionView::Helpers ActionController::Helpers

Classes and Modules

Class ActionView::TestCase::TestController

Constants

EXCLUDE_IVARS = %w{ @output_buffer @fixture_cache @method_name @_result @loaded_fixtures @test_passed @view }

Attributes

controller  [RW] 
output_buffer  [RW] 
rendered  [RW] 

Public Class methods

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 85
85:       def determine_default_helper_class(name)
86:         name.sub(/Test$/, '').constantize
87:       rescue NameError
88:         nil
89:       end

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 77
77:       def helper_class
78:         if current_helper_class = read_inheritable_attribute(:helper_class)
79:           current_helper_class
80:         else
81:           self.helper_class = determine_default_helper_class(name)
82:         end
83:       end

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 91
91:       def helper_method(*methods)
92:         # Almost a duplicate from ActionController::Helpers
93:         methods.flatten.each do |method|
94:           master_helper_module.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)\nend                                             # end\n"
95:         end
96:       end

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 73
73:       def tests(helper_class)
74:         self.helper_class = helper_class
75:       end

Public Instance methods

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 68
68:     def protect_against_forgery?
69:       false
70:     end

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 63
63:     def render(options = {}, local_assigns = {}, &block)
64:       @rendered << output = _view.render(options, local_assigns, &block)
65:       output
66:     end

[Source]

    # File vendor/rails/actionpack/lib/action_view/test_case.rb, line 54
54:     def setup_with_controller
55:       @controller = TestController.new
56:       @output_buffer = ActiveSupport::SafeBuffer.new
57:       @rendered = ''
58: 
59:       self.class.send(:include_helper_modules!)
60:       make_test_case_available_to_view!
61:     end

[Validate]