diff --git a/activerecord/test/cases/associations/inner_join_association_test.rb b/activerecord/test/cases/associations/inner_join_association_test.rb index 769ce5578c..77efc09f6f 100644 --- a/activerecord/test/cases/associations/inner_join_association_test.rb +++ b/activerecord/test/cases/associations/inner_join_association_test.rb @@ -16,8 +16,8 @@ class InnerJoinAssociationTest < ActiveRecord::TestCase :taggings, :tags, :people def test_construct_finder_sql_applies_aliases_tables_on_association_conditions - result = Author.joins(:thinking_posts, :welcome_posts).to_a - assert_equal authors(:david), result.first + result = Author.joins(:thinking_posts, :welcome_posts).first + assert_equal authors(:david), result end def test_construct_finder_sql_does_not_table_name_collide_on_duplicate_associations diff --git a/activerecord/test/cases/associations/left_outer_join_association_test.rb b/activerecord/test/cases/associations/left_outer_join_association_test.rb index 852fdcb36c..02ccdeb1a1 100644 --- a/activerecord/test/cases/associations/left_outer_join_association_test.rb +++ b/activerecord/test/cases/associations/left_outer_join_association_test.rb @@ -22,8 +22,8 @@ class LeftOuterJoinAssociationTest < ActiveRecord::TestCase end def test_construct_finder_sql_applies_aliases_tables_on_association_conditions - result = Author.left_outer_joins(:thinking_posts, :welcome_posts).to_a - assert_equal authors(:david), result.first + result = Author.left_outer_joins(:thinking_posts, :welcome_posts).first + assert_equal authors(:david), result end def test_construct_finder_sql_does_not_table_name_collide_on_duplicate_associations