From 2d3d9e3531d0d49a94ded10b993640053bd76c03 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 10 Mar 2011 19:28:26 +0000 Subject: Rename Reflection#through_reflection_chain and #through_options to Reflection#chain and Reflection#options as they now no longer relate solely to through associations. --- activerecord/test/cases/reflection_test.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb index baaa08a359..4b881969cc 100644 --- a/activerecord/test/cases/reflection_test.rb +++ b/activerecord/test/cases/reflection_test.rb @@ -202,24 +202,24 @@ class ReflectionTest < ActiveRecord::TestCase assert_kind_of ThroughReflection, Subscriber.reflect_on_association(:books) end - def test_through_reflection_chain + def test_chain expected = [ Author.reflect_on_association(:essay_categories), Author.reflect_on_association(:essays), Organization.reflect_on_association(:authors) ] - actual = Organization.reflect_on_association(:author_essay_categories).through_reflection_chain + actual = Organization.reflect_on_association(:author_essay_categories).chain assert_equal expected, actual end - def test_through_conditions + def test_conditions expected = [ ["tags.name = 'Blue'"], ["taggings.comment = 'first'", {"taggable_type"=>"Post"}], ["posts.title LIKE 'misc post%'"] ] - actual = Author.reflect_on_association(:misc_post_first_blue_tags).through_conditions + actual = Author.reflect_on_association(:misc_post_first_blue_tags).conditions assert_equal expected, actual expected = [ @@ -227,7 +227,7 @@ class ReflectionTest < ActiveRecord::TestCase [{"taggable_type"=>"Post"}], [] ] - actual = Author.reflect_on_association(:misc_post_first_blue_tags_2).through_conditions + actual = Author.reflect_on_association(:misc_post_first_blue_tags_2).conditions assert_equal expected, actual end -- cgit v1.2.3