aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-03-10 19:28:26 +0000
committerJon Leighton <j@jonathanleighton.com>2011-03-10 19:28:26 +0000
commit2d3d9e3531d0d49a94ded10b993640053bd76c03 (patch)
treea5bd6b5e212f6b6863fbdd59dca43d58cdd110e7 /activerecord/test
parent6490d65234b89d4d28308b72b13d4834fd44bbb3 (diff)
downloadrails-2d3d9e3531d0d49a94ded10b993640053bd76c03.tar.gz
rails-2d3d9e3531d0d49a94ded10b993640053bd76c03.tar.bz2
rails-2d3d9e3531d0d49a94ded10b993640053bd76c03.zip
Rename Reflection#through_reflection_chain and #through_options to Reflection#chain and Reflection#options as they now no longer relate solely to through associations.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/reflection_test.rb10
1 files changed, 5 insertions, 5 deletions
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