diff --git a/activerecord/test/associations_go_eager_test.rb b/activerecord/test/associations_go_eager_test.rb index 3aeba9031e..d85a1345b4 100644 --- a/activerecord/test/associations_go_eager_test.rb +++ b/activerecord/test/associations_go_eager_test.rb @@ -44,8 +44,9 @@ class EagerAssociationTest < Test::Unit::TestCase def test_eager_association_loading_with_belongs_to comments = Comment.find(:all, :include => :post) - assert_equal posts(:welcome).title, comments.first.post.title - assert_equal posts(:thinking).title, comments.last.post.title + titles = comments.map { |c| c.post.title } + assert titles.include?(posts(:welcome).title) + assert titles.include?(posts(:thinking).title) end def test_eager_association_loading_with_habtm diff --git a/activerecord/test/deprecated_associations_test.rb b/activerecord/test/deprecated_associations_test.rb index b66cc51345..03587070b5 100755 --- a/activerecord/test/deprecated_associations_test.rb +++ b/activerecord/test/deprecated_associations_test.rb @@ -181,7 +181,7 @@ class DeprecatedAssociationsTest < Test::Unit::TestCase active_record = Project.find(1) assert active_record.has_developers? assert_equal 2, active_record.developers_count - assert_equal david.name, active_record.developers.first.name + assert active_record.developers.include?(david) end def test_has_and_belongs_to_many_removing