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:
parent
863ea1b826
commit
71cf717ee2
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue