From 3d1ff79742c46930fa35352c42fb585c3408511b Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 14 Oct 2017 12:28:08 +0900 Subject: Show the failed queries in `test_has_one_does_not_use_order_by` For investigating the cause of failure. https://travis-ci.org/rails/rails/jobs/287474883#L797-L799 --- activerecord/test/cases/associations/has_one_associations_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb index 2a9ebd19ed..ec5d95080b 100644 --- a/activerecord/test/cases/associations/has_one_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_associations_test.rb @@ -30,7 +30,8 @@ class HasOneAssociationsTest < ActiveRecord::TestCase ActiveRecord::SQLCounter.clear_log companies(:first_firm).account ensure - assert ActiveRecord::SQLCounter.log_all.all? { |sql| /order by/i !~ sql }, "ORDER BY was used in the query" + log_all = ActiveRecord::SQLCounter.log_all + assert log_all.all? { |sql| /order by/i !~ sql }, "ORDER BY was used in the query: #{log_all}" end def test_has_one_cache_nils -- cgit v1.2.3