Skip to content

Commit

Permalink
Add tests for prior checkin
Browse files Browse the repository at this point in the history
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 4584376
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion activesupport/test/dependencies/raises_exception.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
10 changes: 9 additions & 1 deletion activesupport/test/dependencies_test.rb
Expand Up @@ -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)
Expand Down Expand Up @@ -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.