aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorZuhao Wan <wanzuhao@gmail.com>2014-06-17 20:55:18 +0800
committerZuhao Wan <wanzuhao@gmail.com>2014-06-17 20:57:02 +0800
commit0c2fbc509545612908dd7bbdde3221518a2ec0e1 (patch)
tree6f63f63f49a01fad38fe5cf9d9097329630d5a0c /activesupport
parente2f232aba15937a4b9d14bd91e0392c6d55be58d (diff)
downloadrails-0c2fbc509545612908dd7bbdde3221518a2ec0e1.tar.gz
rails-0c2fbc509545612908dd7bbdde3221518a2ec0e1.tar.bz2
rails-0c2fbc509545612908dd7bbdde3221518a2ec0e1.zip
Move test teardown into `ensure` block.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/core_ext/kernel/concern_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/kernel/concern_test.rb b/activesupport/test/core_ext/kernel/concern_test.rb
index 9b1fdda3b0..478a00d2d2 100644
--- a/activesupport/test/core_ext/kernel/concern_test.rb
+++ b/activesupport/test/core_ext/kernel/concern_test.rb
@@ -6,7 +6,8 @@ class KernelConcernTest < ActiveSupport::TestCase
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