Add and remove renderer inside the test to prevent leak.
Merge pull request #15385 from zuhao/refactor_actionpack_render_other_test

Add and remove renderer inside the test to prevent leak.