diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2015-11-24 02:11:09 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2015-11-24 02:11:09 -0200 |
commit | 40acdcfb7c9a5af402ec4f5a01d8bca4f6bf80a8 (patch) | |
tree | 9ea944e3bc06466feba1dc731a6217cad6b8972a /actionpack/test | |
parent | 7b122d3988dc3607385bc59a67713a36c7eda4d9 (diff) | |
parent | 08689a2d1f0165f353f62ef4626e87fe841ec735 (diff) | |
download | rails-40acdcfb7c9a5af402ec4f5a01d8bca4f6bf80a8.tar.gz rails-40acdcfb7c9a5af402ec4f5a01d8bca4f6bf80a8.tar.bz2 rails-40acdcfb7c9a5af402ec4f5a01d8bca4f6bf80a8.zip |
Merge pull request #22172 from tijmenb/fix-source-in-show-exception
Add text template for source code
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 8960156d00..30772bd9ed 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -166,6 +166,14 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_equal "text/plain", response.content_type assert_match(/RuntimeError\npuke/, body) + Rails.stub :root, Pathname.new('.') do + get "/", headers: xhr_request_env + + assert_response 500 + assert_match 'Extracted source (around line #', body + assert_select 'pre', { count: 0 }, body + end + get "/not_found", headers: xhr_request_env assert_response 404 assert_no_match(/<body>/, body) |