aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/modules_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-05-15 14:08:51 +0000
committerRick Olson <technoweenie@gmail.com>2006-05-15 14:08:51 +0000
commitbe3a4849a909545de444ef6d4f5751eea8a3ba1f (patch)
tree1f2c5beb48a9d1cd83b84e80bce51106560febdb /activerecord/test/modules_test.rb
parent6ef5b747b3d7cfb156ae619b9ba6ec3ea693bf30 (diff)
downloadrails-be3a4849a909545de444ef6d4f5751eea8a3ba1f.tar.gz
rails-be3a4849a909545de444ef6d4f5751eea8a3ba1f.tar.bz2
rails-be3a4849a909545de444ef6d4f5751eea8a3ba1f.zip
Call Inflector#demodulize on the class name when eagerly including an STI model. Closes #5077 [info@loobmedia.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/modules_test.rb')
-rw-r--r--activerecord/test/modules_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/modules_test.rb b/activerecord/test/modules_test.rb
index 6f919bbd78..b2ef8730ea 100644
--- a/activerecord/test/modules_test.rb
+++ b/activerecord/test/modules_test.rb
@@ -25,4 +25,11 @@ class ModulesTest < Test::Unit::TestCase
assert_kind_of MyApplication::Billing::Nested::Firm, account.nested_qualified_billing_firm
assert_kind_of MyApplication::Billing::Nested::Firm, account.nested_unqualified_billing_firm
end
+
+ def test_find_account_and_include_company
+ account = MyApplication::Billing::Account.find(1, :include => :firm)
+ assert_kind_of MyApplication::Business::Firm, account.instance_variable_get('@firm')
+ assert_kind_of MyApplication::Business::Firm, account.firm
+ end
+
end