aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object_and_class_ext_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext/object_and_class_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb
index 71eeb4bdb8..a0a6243480 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -19,3 +19,15 @@ class ClassExtTest < Test::Unit::TestCase
assert !defined?(ClassD)
end
end
+
+class ObjectTests < Test::Unit::TestCase
+ def test_suppress_re_raises
+ assert_raises(LoadError) { suppress(ArgumentError) {raise LoadError} }
+ end
+ def test_suppress_supresses
+ suppress(ArgumentError) { raise ArgumentError }
+ suppress(LoadError) { raise LoadError }
+ suppress(LoadError, ArgumentError) { raise LoadError }
+ suppress(LoadError, ArgumentError) { raise ArgumentError }
+ end
+end \ No newline at end of file