aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-23 11:48:10 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-23 11:48:10 +0000
commit3697df1dd2be6e51867bea4d6089f01f8f204f3c (patch)
tree6d529e1637b88b89d9436531bfef2be33c9b3f02 /activesupport/test
parentd09e42cfe4b970c03402ab41e3eef95cd32fa4d3 (diff)
downloadrails-3697df1dd2be6e51867bea4d6089f01f8f204f3c.tar.gz
rails-3697df1dd2be6e51867bea4d6089f01f8f204f3c.tar.bz2
rails-3697df1dd2be6e51867bea4d6089f01f8f204f3c.zip
Improved error reporting especially around never shallowing exceptions. Debugging helpers should be much easier now #980 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-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