From 71cf717ee297bc2407de304e5a880f1e39ab4f3c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 11 Sep 2013 17:37:39 -0700 Subject: these are not real developer objects, so counting them doesn't make sense. Let's load the object to ensure it's an array and count the array. --- .../cases/associations/has_and_belongs_to_many_associations_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb') diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index bb927841ab..f77066e6ab 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -651,7 +651,7 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase end def test_find_scoped_grouped_having - assert_equal 2, projects(:active_record).well_payed_salary_groups.size + assert_equal 2, projects(:active_record).well_payed_salary_groups.to_a.size assert projects(:active_record).well_payed_salary_groups.all? { |g| g.salary > 10000 } end -- cgit v1.2.3