1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add tests for prior checkin

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar 2006-08-17 17:32:23 +00:00
parent cad830fb20
commit 4584376a91
2 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -51,7 +51,7 @@ class DependenciesTest < Test::Unit::TestCase
$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 @@ class DependenciesTest < Test::Unit::TestCase
end
end
def test_nested_load_error_isnt_rescued
with_loading 'dependencies' do
assert_raises(MissingSourceFile) do
RequiresNonexistent1
end
end
end
end