diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/reflection_test.rb | 7 |
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 |