From ef4c65088fb907fc819e6b5d83d284c38cdaabfc Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 19 Apr 2008 18:52:14 +0100 Subject: Move missing template logic to ActionView --- actionpack/test/controller/cookie_test.rb | 2 +- actionpack/test/controller/flash_test.rb | 2 +- actionpack/test/controller/layout_test.rb | 2 +- actionpack/test/controller/mime_responds_test.rb | 2 +- actionpack/test/controller/new_render_test.rb | 4 ++-- actionpack/test/controller/rescue_test.rb | 2 +- actionpack/test/template/template_object_test.rb | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb index 0483fe918a..42f3bd26a4 100644 --- a/actionpack/test/controller/cookie_test.rb +++ b/actionpack/test/controller/cookie_test.rb @@ -37,7 +37,7 @@ class CookieTest < Test::Unit::TestCase end def rescue_action(e) - raise unless ActionController::MissingTemplate # No templates here, and we don't care about the output + raise unless ActionView::MissingTemplate # No templates here, and we don't care about the output end end diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb index f672f2f427..e562531bf3 100644 --- a/actionpack/test/controller/flash_test.rb +++ b/actionpack/test/controller/flash_test.rb @@ -52,7 +52,7 @@ class FlashTest < Test::Unit::TestCase end def rescue_action(e) - raise unless ActionController::MissingTemplate === e + raise unless ActionView::MissingTemplate === e end # methods for test_sweep_after_halted_filter_chain diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index 145543a357..3dc311b78a 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -216,7 +216,7 @@ class LayoutExceptionRaised < Test::Unit::TestCase @controller = SetsNonExistentLayoutFile.new get :hello @response.template.class.module_eval { attr_accessor :exception } - assert_equal ActionController::MissingTemplate, @response.template.exception.class + assert_equal ActionView::MissingTemplate, @response.template.exception.class end end diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index c34643ddd5..c617cb2e84 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -468,7 +468,7 @@ class MimeControllerTest < Test::Unit::TestCase assert_equal '
Hello future from Firefox!
', @response.body @request.env["HTTP_ACCEPT"] = "text/iphone" - assert_raises(ActionController::MissingTemplate) { get :iphone_with_html_response_type_without_layout } + assert_raises(ActionView::MissingTemplate) { get :iphone_with_html_response_type_without_layout } end end diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index 342e2e7f87..80cf09e5f3 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -652,7 +652,7 @@ EOS end def test_bad_render_to_string_still_throws_exception - assert_raises(ActionController::MissingTemplate) { get :render_to_string_with_exception } + assert_raises(ActionView::MissingTemplate) { get :render_to_string_with_exception } end def test_render_to_string_that_throws_caught_exception_doesnt_break_assigns @@ -787,7 +787,7 @@ EOS end def test_render_missing_partial_template - assert_raises(ActionView::ActionViewError) do + assert_raises(ActionView::MissingTemplate) do get :missing_partial end end diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 011992474f..27fcc5e04c 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -279,7 +279,7 @@ class RescueTest < Test::Unit::TestCase assert_equal ActionController::Rescue::DEFAULT_RESCUE_TEMPLATE, templates.default assert_equal ActionController::Rescue::DEFAULT_RESCUE_TEMPLATE, templates[Exception.new] - assert_equal 'missing_template', templates[ActionController::MissingTemplate.name] + assert_equal 'missing_template', templates[ActionView::MissingTemplate.name] assert_equal 'routing_error', templates[ActionController::RoutingError.name] assert_equal 'unknown_action', templates[ActionController::UnknownAction.name] assert_equal 'template_error', templates[ActionView::TemplateError.name] diff --git a/actionpack/test/template/template_object_test.rb b/actionpack/test/template/template_object_test.rb index b3a33938cf..7adcde421f 100644 --- a/actionpack/test/template/template_object_test.rb +++ b/actionpack/test/template/template_object_test.rb @@ -82,7 +82,7 @@ class TemplateObjectTest < Test::Unit::TestCase def test_xml @view.template_format = :xml - assert_raise ActionView::ActionViewError do + assert_raise ActionView::MissingTemplate do ActionView::PartialTemplate.new(@view, @path, nil) end end -- cgit v1.2.3