diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-07-11 23:32:02 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-07-11 23:32:02 +0000 |
commit | d4d4a08f6b064e47145b1abaca803654957f7a03 (patch) | |
tree | 1f732e6b61c18f220c651f8422059c59d64deffe /actionpack/test | |
parent | e80fabbbf46cadb69c30e6125ef0422f96ca8b6b (diff) | |
download | rails-d4d4a08f6b064e47145b1abaca803654957f7a03.tar.gz rails-d4d4a08f6b064e47145b1abaca803654957f7a03.tar.bz2 rails-d4d4a08f6b064e47145b1abaca803654957f7a03.zip |
Make sure missing template exceptions actually say which template they were looking for. Closes #8683 [dasil003]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/rescue_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 100fee8a6e..6756e226c3 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -15,6 +15,8 @@ class RescueController < ActionController::Base def not_implemented raise ActionController::NotImplemented.new(:get, :put) end + + def missing_template; end end @@ -116,6 +118,18 @@ class RescueTest < Test::Unit::TestCase end + def test_rescue_missing_template_in_public + with_rails_root FIXTURE_PUBLIC do + with_all_requests_local true do + get :missing_template + end + end + + assert_response :internal_server_error + assert @response.body.include?('missing_template'), "Response should include the template name." + end + + def test_rescue_action_locally get :raises assert_response :internal_server_error |