Permalink
Browse files

Add tests for prior checkin

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
seckar committed Aug 17, 2006
1 parent cad830f commit 4584376a914f8a8cee059943d80ba73d2d4e2627
Showing with 10 additions and 2 deletions.
  1. +1 −1 activesupport/test/dependencies/raises_exception.rb
  2. +9 −1 activesupport/test/dependencies_test.rb
@@ -1,3 +1,3 @@
$raises_exception_load_count += 1
-raise 'Loading me failed, so do not add to loaded or history.'
+raise Exception, 'Loading me failed, so do not add to loaded or history.'
$raises_exception_load_count += 1
@@ -51,7 +51,7 @@ def test_dependency_which_raises_exception_isnt_added_to_loaded_set
$raises_exception_load_count = 0
5.times do |count|
- assert_raises(RuntimeError) { require_dependency filename }
+ assert_raises(Exception) { require_dependency filename }
assert_equal count + 1, $raises_exception_load_count
assert !Dependencies.loaded.include?(filename)
@@ -387,4 +387,12 @@ def test_removal_from_tree_should_be_detected
end
end
+ def test_nested_load_error_isnt_rescued
+ with_loading 'dependencies' do
+ assert_raises(MissingSourceFile) do
+ RequiresNonexistent1
+ end
+ end
+ end
+
end

0 comments on commit 4584376

Please sign in to comment.