From 85bb292a8fa95d9685b42b8a131d1f97aa34491c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 27 Feb 2005 17:18:35 +0000 Subject: Added MacroReflection#macro which will return a symbol describing the macro used (like :composed_of or :has_many) #718, #248 [james@slashetc.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/reflection_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/reflection_test.rb b/activerecord/test/reflection_test.rb index aa9b721d97..2842cc34bd 100644 --- a/activerecord/test/reflection_test.rb +++ b/activerecord/test/reflection_test.rb @@ -42,11 +42,11 @@ class ReflectionTest < Test::Unit::TestCase def test_aggregation_reflection reflection_for_address = ActiveRecord::Reflection::AggregateReflection.new( - :address, { :mapping => [ %w(address_street street), %w(address_city city), %w(address_country country) ] }, Customer + :composed_of, :address, { :mapping => [ %w(address_street street), %w(address_city city), %w(address_country country) ] }, Customer ) reflection_for_balance = ActiveRecord::Reflection::AggregateReflection.new( - :balance, { :class_name => "Money", :mapping => %w(balance amount) }, Customer + :composed_of, :balance, { :class_name => "Money", :mapping => %w(balance amount) }, Customer ) assert_equal( @@ -61,7 +61,7 @@ class ReflectionTest < Test::Unit::TestCase def test_association_reflection reflection_for_clients = ActiveRecord::Reflection::AssociationReflection.new( - :clients, { :order => "id", :dependent => true }, Firm + :has_many, :clients, { :order => "id", :dependent => true }, Firm ) assert_equal reflection_for_clients, Firm.reflect_on_association(:clients) -- cgit v1.2.3