aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/modules_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-02-22 18:44:14 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-02-22 18:44:14 +0000
commitc7d6d68f91f2cd2e04c2113cba44bef86dbad99f (patch)
treef9c4a03d7254d648718e671c4619f8637235b428 /activerecord/test/modules_test.rb
parentde54db3c1e2056322450e46c265b27792e99b2c7 (diff)
downloadrails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.tar.gz
rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.tar.bz2
rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.zip
Reflections don't attempt to resolve module nesting of association classes. Simplify type computation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/modules_test.rb')
-rw-r--r--activerecord/test/modules_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/modules_test.rb b/activerecord/test/modules_test.rb
index d34afbb8f8..5c3cc1906e 100644
--- a/activerecord/test/modules_test.rb
+++ b/activerecord/test/modules_test.rb
@@ -18,6 +18,11 @@ class ModulesTest < Test::Unit::TestCase
end
def test_associations_spanning_cross_modules
- assert MyApplication::Billing::Account.find(1).has_firm?, "37signals account should be able to backtrack"
+ account = MyApplication::Billing::Account.find(:first)
+ assert_kind_of MyApplication::Business::Firm, account.firm
+ assert_kind_of MyApplication::Billing::Firm, account.qualified_billing_firm
+ assert_kind_of MyApplication::Billing::Firm, account.unqualified_billing_firm
+ 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
end