diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-11 17:37:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-11 17:37:57 -0700 |
commit | 71cf717ee297bc2407de304e5a880f1e39ab4f3c (patch) | |
tree | f03c7c568c7e5c331997bba7c4807553b550b0eb | |
parent | 863ea1b82691b5d10ff189fef162b9f760423ed6 (diff) | |
download | rails-71cf717ee297bc2407de304e5a880f1e39ab4f3c.tar.gz rails-71cf717ee297bc2407de304e5a880f1e39ab4f3c.tar.bz2 rails-71cf717ee297bc2407de304e5a880f1e39ab4f3c.zip |
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.
-rw-r--r-- | activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |