1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Aaron Patterson 2013-09-11 17:37:39 -07:00
parent 863ea1b826
commit 71cf717ee2

View file

@ -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