Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move test teardown into `ensure` block.

  • Loading branch information...
commit 0c2fbc509545612908dd7bbdde3221518a2ec0e1 1 parent e2f232a
@zuhao zuhao authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  activesupport/test/core_ext/kernel/concern_test.rb
View
3  activesupport/test/core_ext/kernel/concern_test.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.