diff options
author | Chulki Lee <chulki.lee@gmail.com> | 2014-01-10 16:27:18 -0800 |
---|---|---|
committer | Chulki Lee <chulki.lee@gmail.com> | 2014-01-13 12:47:14 -0800 |
commit | bea44cbaa48433d427a9418ff6b5c617b10e0585 (patch) | |
tree | 89bc319a4b5396c57da214411ec06f69f0e231fe /activerecord/test/cases | |
parent | 8b70319c270415e9f99ed8eb1f12dd1caaade1fd (diff) | |
download | rails-bea44cbaa48433d427a9418ff6b5c617b10e0585.tar.gz rails-bea44cbaa48433d427a9418ff6b5c617b10e0585.tar.bz2 rails-bea44cbaa48433d427a9418ff6b5c617b10e0585.zip |
Set NameError#name
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index cb8e564da1..4bc6002bfe 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1301,9 +1301,11 @@ class BasicsTest < ActiveRecord::TestCase end def test_compute_type_nonexistent_constant - assert_raises NameError do + e = assert_raises NameError do ActiveRecord::Base.send :compute_type, 'NonexistentModel' end + assert_equal 'uninitialized constant ActiveRecord::Base::NonexistentModel', e.message + assert_equal 'ActiveRecord::Base::NonexistentModel', e.name end def test_compute_type_no_method_error |