diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-10-14 12:28:08 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-10-14 12:30:01 +0900 |
commit | 3d1ff79742c46930fa35352c42fb585c3408511b (patch) | |
tree | 4e82aad7b6b770e8d6aab167e989daa87388651f /activerecord/test | |
parent | d1695b4fe45ee3b539c0aa3ffead01ac9e562fdc (diff) | |
download | rails-3d1ff79742c46930fa35352c42fb585c3408511b.tar.gz rails-3d1ff79742c46930fa35352c42fb585c3408511b.tar.bz2 rails-3d1ff79742c46930fa35352c42fb585c3408511b.zip |
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
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/has_one_associations_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |