diff options
Diffstat (limited to 'activerecord/test/cases/modules_test.rb')
-rw-r--r-- | activerecord/test/cases/modules_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/modules_test.rb b/activerecord/test/cases/modules_test.rb index c433da71f2..283333fc04 100644 --- a/activerecord/test/cases/modules_test.rb +++ b/activerecord/test/cases/modules_test.rb @@ -31,4 +31,9 @@ class ModulesTest < ActiveRecord::TestCase assert_kind_of MyApplication::Business::Firm, account.firm end + def test_table_name + assert_equal 'accounts', MyApplication::Billing::Account.table_name, 'table_name for ActiveRecord model in module' + assert_equal 'companies', MyApplication::Business::Client.table_name, 'table_name for ActiveRecord model subclass' + assert_equal 'company_contacts', MyApplication::Business::Client::Contact.table_name, 'table_name for ActiveRecord model enclosed by another ActiveRecord model' + end end |