diff options
author | Yehuda Katz <wycats@Yehuda-Katz.local> | 2010-01-19 22:35:09 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@Yehuda-Katz.local> | 2010-01-19 22:35:26 -0800 |
commit | 1a50d2e66a80c910fe1e2203eb2c993e5dbc4e5b (patch) | |
tree | 57994f2048b69feb96ffa33ca6d084daec26b47c /activesupport/test | |
parent | 5ebfa6242726bd186452640ed5704f2adc1a5007 (diff) | |
download | rails-1a50d2e66a80c910fe1e2203eb2c993e5dbc4e5b.tar.gz rails-1a50d2e66a80c910fe1e2203eb2c993e5dbc4e5b.tar.bz2 rails-1a50d2e66a80c910fe1e2203eb2c993e5dbc4e5b.zip |
Stop overriding LoadError.new to return a MissingSourceError (and sometimes nil!)
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/load_error_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/load_error_test.rb b/activesupport/test/core_ext/load_error_test.rb index b775b65f9f..d7b8f602ca 100644 --- a/activesupport/test/core_ext/load_error_test.rb +++ b/activesupport/test/core_ext/load_error_test.rb @@ -15,3 +15,18 @@ class TestMissingSourceFile < Test::Unit::TestCase end end end + +class TestLoadError < Test::Unit::TestCase + def test_with_require + assert_raise(LoadError) { require 'no_this_file_don\'t_exist' } + end + def test_with_load + assert_raise(LoadError) { load 'nor_does_this_one' } + end + def test_path + begin load 'nor/this/one.rb' + rescue LoadError => e + assert_equal 'nor/this/one.rb', e.path + end + end +end
\ No newline at end of file |