Move test teardown into `ensure` block.
Merge pull request #15768 from zuhao/refactor_activesupport_concern_test

Move test teardown into `ensure` block.