class LayoutSetInResponseTest
Public Instance Methods
test_absolute_pathed_layout()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 225 def test_absolute_pathed_layout @controller = AbsolutePathLayoutController.new get :hello assert_equal "layout_test.erb hello.erb", @response.body.strip end
test_layout_except_exception_when_excepted()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 199 def test_layout_except_exception_when_excepted @controller = ExceptLayoutController.new get :goodbye assert_not_includes @response.body, "item.erb" end
test_layout_except_exception_when_included()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 193 def test_layout_except_exception_when_included @controller = ExceptLayoutController.new get :hello assert_includes @response.body, "item.erb" end
test_layout_is_not_set_when_none_rendered()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 213 def test_layout_is_not_set_when_none_rendered @controller = RendersNoLayoutController.new get :hello assert_equal "hello.erb", @response.body end
test_layout_is_picked_from_the_controller_instances_view_path()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 219 def test_layout_is_picked_from_the_controller_instances_view_path @controller = PrependsViewPathController.new get :hello assert_includes @response.body, "alt.erb" end
test_layout_only_exception_when_excepted()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 187 def test_layout_only_exception_when_excepted @controller = OnlyLayoutController.new get :goodbye assert_not_includes @response.body, "item.erb" end
test_layout_only_exception_when_included()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 181 def test_layout_only_exception_when_included @controller = OnlyLayoutController.new get :hello assert_includes @response.body, "item.erb" end
test_layout_proc_set_in_controller_returning_nil_falls_back_to_default()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 175 def test_layout_proc_set_in_controller_returning_nil_falls_back_to_default @controller = HasNilLayoutProc.new get :hello assert_includes @response.body, "layout_test.erb" end
test_layout_set_when_set_in_controller()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 163 def test_layout_set_when_set_in_controller @controller = HasOwnLayoutController.new get :hello assert_includes @response.body, "item.erb" end
test_layout_set_when_using_default_layout()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 151 def test_layout_set_when_using_default_layout @controller = DefaultLayoutController.new get :hello assert_includes @response.body, "layout_test.erb" end
test_layout_set_when_using_render()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 205 def test_layout_set_when_using_render with_template_handler :mab, lambda { |template| template.source.inspect } do @controller = SetsLayoutInRenderController.new get :hello assert_includes @response.body, "layouts/third_party_template_library.mab" end end
test_layout_set_when_using_streaming_layout()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 157 def test_layout_set_when_using_streaming_layout @controller = StreamingLayoutController.new get :hello assert_includes @response.body, "layout_test.erb" end
test_layout_symbol_set_in_controller_returning_nil_falls_back_to_default()
click to toggle source
# File actionview/test/actionpack/controller/layout_test.rb, line 169 def test_layout_symbol_set_in_controller_returning_nil_falls_back_to_default @controller = HasNilLayoutSymbol.new get :hello assert_includes @response.body, "layout_test.erb" end