提交 0c2fbc50 编写于 作者: Z Zuhao Wan

Move test teardown into `ensure` block.

上级 e2f232ab
......@@ -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.
先完成此消息的编辑!
想要评论请 注册