From bb9554ad62a3f37738ee7ad99dbbb9a37784c343 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 23 Sep 2013 18:15:38 -0700 Subject: we can't sort by lhs since the middle records have difference classes and possibly different rules for finding those objects --- .../test/cases/associations/has_many_through_associations_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 149c9576ca..29f6166b00 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -47,7 +47,8 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase club1 = Club.includes(:members).find_by_id club.id left, right = club1.members.map(&:id) - assert_operator left, :>, right + assert_equal [member1, member2].sort_by(&:id), + club1.members.sort_by(&:id) end def make_model(name) -- cgit v1.2.3