提交 e7a8fda0 编写于 作者: Y Yves Senn

Merge pull request #15768 from zuhao/refactor_activesupport_concern_test

Move test teardown into `ensure` block.
......@@ -6,7 +6,8 @@ def test_may_be_defined_at_toplevel
mod = ::TOPLEVEL_BINDING.eval 'concern(:ToplevelConcern) { }'
assert_equal mod, ::ToplevelConcern
assert_kind_of ActiveSupport::Concern, ::ToplevelConcern
assert !Object.ancestors.include?(::ToplevelConcern), mod.ancestors.inspect
assert_not Object.ancestors.include?(::ToplevelConcern), mod.ancestors.inspect
ensure
Object.send :remove_const, :ToplevelConcern
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册