diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 69665098af..391ee57632 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -1257,6 +1257,11 @@ class BasicsTest < Test::Unit::TestCase assert_equal(%w( title ), topics(:first).attributes(:only => :title).keys) assert_equal(%w( title author_name type id approved ), topics(:first).attributes(:only => [ :title, :id, :type, :approved, :author_name ]).keys) end + + def test_type_name_with_module_should_handle_beginning + assert_equal 'ActiveRecord::Person', ActiveRecord::Base.send(:type_name_with_module, 'Person') + assert_equal '::Person', ActiveRecord::Base.send(:type_name_with_module, '::Person') + end # FIXME: this test ought to run, but it needs to run sandboxed so that it # doesn't b0rk the current test environment by undefing everything. |