aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-01-14 12:08:44 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-01-14 12:08:44 +0000
commitb78458284bf0c7d5158181fd4d7e0a507f77edca (patch)
treed9dc51ddd9a55d1c451638ce30c63431803e7221 /activerecord/test
parent937eeab103a14bb4db61ec1841ad57e01636bf21 (diff)
downloadrails-b78458284bf0c7d5158181fd4d7e0a507f77edca.tar.gz
rails-b78458284bf0c7d5158181fd4d7e0a507f77edca.tar.bz2
rails-b78458284bf0c7d5158181fd4d7e0a507f77edca.zip
Aggregate reflection klass works with nested :class_name
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5923 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/reflection_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/reflection_test.rb b/activerecord/test/reflection_test.rb
index 796076bc81..cc06d31299 100644
--- a/activerecord/test/reflection_test.rb
+++ b/activerecord/test/reflection_test.rb
@@ -60,6 +60,13 @@ class ReflectionTest < Test::Unit::TestCase
assert_equal :integer, @first.column_for_attribute("id").type
end
+ def test_reflection_klass_for_nested_class_name
+ reflection = ActiveRecord::Reflection::MacroReflection.new(nil, nil, { :class_name => 'MyApplication::Business::Company' }, nil)
+ assert_nothing_raised do
+ assert_equal MyApplication::Business::Company, reflection.klass
+ end
+ end
+
def test_aggregation_reflection
reflection_for_address = ActiveRecord::Reflection::AggregateReflection.new(
:composed_of, :address, { :mapping => [ %w(address_street street), %w(address_city city), %w(address_country country) ] }, Customer