diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2019-03-19 18:42:37 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2019-03-19 18:42:37 -0400 |
commit | a207b9422762429ea365c519beaacf965df24cb9 (patch) | |
tree | 9b18696804f76237e80d3d14d5be28ee122f6810 /actionpack/test | |
parent | 5757c9d3c05e52cb5903bf362c752a34540d73ba (diff) | |
download | rails-a207b9422762429ea365c519beaacf965df24cb9.tar.gz rails-a207b9422762429ea365c519beaacf965df24cb9.tar.bz2 rails-a207b9422762429ea365c519beaacf965df24cb9.zip |
Fix test broken by 04ae0b0b5e594e0bb99c5cd608921745977bcdcd
This test was trying to set the exception_app in the wrapper proxy
instead in the middleware itself.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/show_exceptions_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/test/controller/show_exceptions_test.rb b/actionpack/test/controller/show_exceptions_test.rb index 2094aa1aed..8724f9bcdb 100644 --- a/actionpack/test/controller/show_exceptions_test.rb +++ b/actionpack/test/controller/show_exceptions_test.rb @@ -99,15 +99,16 @@ module ShowExceptions class ShowFailsafeExceptionsTest < ActionDispatch::IntegrationTest def test_render_failsafe_exception @app = ShowExceptionsOverriddenController.action(:boom) - @exceptions_app = @app.instance_variable_get(:@exceptions_app) - @app.instance_variable_set(:@exceptions_app, nil) + middleware = @app.instance_variable_get(:@middleware) + @exceptions_app = middleware.instance_variable_get(:@exceptions_app) + middleware.instance_variable_set(:@exceptions_app, nil) $stderr = StringIO.new get "/", headers: { "HTTP_ACCEPT" => "text/json" } assert_response :internal_server_error assert_equal "text/plain", response.content_type.to_s ensure - @app.instance_variable_set(:@exceptions_app, @exceptions_app) + middleware.instance_variable_set(:@exceptions_app, @exceptions_app) $stderr = STDERR end end |