diff options
author | Rick Olson <technoweenie@gmail.com> | 2008-03-24 02:50:02 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2008-03-24 02:50:02 +0000 |
commit | 081ddb6f24d70794ee9e071d3ed5302f52b26c4d (patch) | |
tree | a5c8e4a4f02cd38cfb182bdaf0e8491c7a0586d4 /activerecord/test/cases/associations | |
parent | 5bf4cbbdb74dfaaac258dc93e54dcae8295211e9 (diff) | |
download | rails-081ddb6f24d70794ee9e071d3ed5302f52b26c4d.tar.gz rails-081ddb6f24d70794ee9e071d3ed5302f52b26c4d.tar.bz2 rails-081ddb6f24d70794ee9e071d3ed5302f52b26c4d.zip |
Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/cascaded_eager_loading_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb index 6349a3a8b2..3631be76a0 100644 --- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb @@ -61,16 +61,17 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase def test_eager_association_loading_with_has_many_sti topics = Topic.find(:all, :include => :replies, :order => 'topics.id') - assert_equal topics(:first, :second), topics + first, second, = topics(:first).replies.size, topics(:second).replies.size assert_no_queries do - assert_equal 1, topics[0].replies.size - assert_equal 0, topics[1].replies.size + assert_equal first, topics[0].replies.size + assert_equal second, topics[1].replies.size end end def test_eager_association_loading_with_belongs_to_sti replies = Reply.find(:all, :include => :topic, :order => 'topics.id') - assert_equal [topics(:second)], replies + assert replies.include?(topics(:second)) + assert !replies.include?(topics(:first)) assert_equal topics(:first), assert_no_queries { replies.first.topic } end |