diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-24 01:33:18 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-24 01:33:18 +0530 |
commit | efd0bd3b7390ebb8526b981169025f2860f6a113 (patch) | |
tree | 1cb3bcd8f9534f64e8a764af1010ce65303b42b0 /activesupport/test/core_ext/load_error_test.rb | |
parent | f4571e3617ccd9cc9e5ee9f7431066bd80395e22 (diff) | |
parent | 8ff2fb6f3aa6140f5a8bd018d5919a8a1e707cda (diff) | |
download | rails-efd0bd3b7390ebb8526b981169025f2860f6a113.tar.gz rails-efd0bd3b7390ebb8526b981169025f2860f6a113.tar.bz2 rails-efd0bd3b7390ebb8526b981169025f2860f6a113.zip |
Merge remote branch 'mainstream/master'
Diffstat (limited to 'activesupport/test/core_ext/load_error_test.rb')
-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 |