aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-05-15 13:41:54 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-05-15 13:47:05 +0100
commit802034ff5f1c3e3b576b664d5660e76c8f44909d (patch)
tree9bb32bab53553ec3f06b2b80e71d60b522abc6e5 /activerecord/test/cases
parentb28b54cab090bed8f099ef375b419a8f92390dd4 (diff)
downloadrails-802034ff5f1c3e3b576b664d5660e76c8f44909d.tar.gz
rails-802034ff5f1c3e3b576b664d5660e76c8f44909d.tar.bz2
rails-802034ff5f1c3e3b576b664d5660e76c8f44909d.zip
DRY associations code and improve eager loading tests.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/finder_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index d3e2f33f99..5c0f0e2ef1 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -9,6 +9,7 @@ require 'models/developer'
require 'models/post'
require 'models/customer'
require 'models/job'
+require 'models/categorization'
class FinderTest < ActiveRecord::TestCase
fixtures :companies, :topics, :entrants, :developers, :developers_projects, :posts, :comments, :accounts, :authors, :customers
@@ -866,7 +867,9 @@ class FinderTest < ActiveRecord::TestCase
end
def test_with_limiting_with_custom_select
- assert_equal 3, Post.find(:all, :include => :author, :select => ' posts.*, authors.id as "author_id"', :limit => 3).size
+ posts = Post.find(:all, :include => :author, :select => ' posts.*, authors.id as "author_id"', :limit => 3)
+ assert_equal 3, posts.size
+ assert_equal [0, 1, 1], posts.map(&:author_id).sort
end
protected