diff options
author | John Mileham <jmileham@gmail.com> | 2011-03-24 15:09:24 -0400 |
---|---|---|
committer | John Mileham <jmileham@gmail.com> | 2011-03-24 15:09:24 -0400 |
commit | 28c73f012328c8386acfc608f0dfb1a459dbf170 (patch) | |
tree | 95f78cfe8f8ac57b042a2a8b2b18049c5703c3d6 /activerecord/test | |
parent | b44a0ec153c84384e9b97a069e81f28bc5c2a4bf (diff) | |
download | rails-28c73f012328c8386acfc608f0dfb1a459dbf170.tar.gz rails-28c73f012328c8386acfc608f0dfb1a459dbf170.tar.bz2 rails-28c73f012328c8386acfc608f0dfb1a459dbf170.zip |
Use Arel to build subquery. Adapt tests to changed fixtures.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index dad6665990..dfb5735b5d 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -667,14 +667,14 @@ class RelationTest < ActiveRecord::TestCase end def test_size_with_limit - posts = Post.limit(6) + posts = Post.limit(10) - assert_queries(1) { assert_equal 6, posts.size } + assert_queries(1) { assert_equal 10, posts.size } assert ! posts.loaded? best_posts = posts.where(:comments_count => 0) best_posts.to_a # force load - assert_no_queries { assert_equal 5, best_posts.size } + assert_no_queries { assert_equal 9, best_posts.size } end def test_size_with_zero_limit |