diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-08-17 17:32:23 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-08-17 17:32:23 +0000 |
commit | 4584376a914f8a8cee059943d80ba73d2d4e2627 (patch) | |
tree | a37ca5bd3557c6aa561ce9debfbeb49cf3b5a523 /activesupport | |
parent | cad830fb20e836157efee98b71c76611eb3f38c6 (diff) | |
download | rails-4584376a914f8a8cee059943d80ba73d2d4e2627.tar.gz rails-4584376a914f8a8cee059943d80ba73d2d4e2627.tar.bz2 rails-4584376a914f8a8cee059943d80ba73d2d4e2627.zip |
Add tests for prior checkin
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/dependencies/raises_exception.rb | 2 | ||||
-rw-r--r-- | activesupport/test/dependencies_test.rb | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/activesupport/test/dependencies/raises_exception.rb b/activesupport/test/dependencies/raises_exception.rb index 69750eee72..dd745ac20e 100644 --- a/activesupport/test/dependencies/raises_exception.rb +++ b/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 diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index f969a30891..8b74bd4b93 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -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 |