diff options
author | Xavier Noria <fxn@hashref.com> | 2013-05-10 08:05:54 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-05-10 08:05:54 -0700 |
commit | 4fa860728fe2ed8f248e9f3e89f0a144b8f314c8 (patch) | |
tree | 1db73184fbd993810887808f2a88c2c27915d4cd /activerecord/test/cases | |
parent | 3589181122f1a70abc1acd8c6bf41b46e2be2f5a (diff) | |
parent | a33d320cf4b57fabd9c299b09c217ee3955ecc77 (diff) | |
download | rails-4fa860728fe2ed8f248e9f3e89f0a144b8f314c8.tar.gz rails-4fa860728fe2ed8f248e9f3e89f0a144b8f314c8.tar.bz2 rails-4fa860728fe2ed8f248e9f3e89f0a144b8f314c8.zip |
Merge pull request #10555 from dasch/dasch/3-2-stable
Don't try to EXPLAIN select_db calls
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/explain_subscriber_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/explain_subscriber_test.rb b/activerecord/test/cases/explain_subscriber_test.rb index 7b852a625d..f929ddd79e 100644 --- a/activerecord/test/cases/explain_subscriber_test.rb +++ b/activerecord/test/cases/explain_subscriber_test.rb @@ -38,6 +38,13 @@ if ActiveRecord::Base.connection.supports_explain? end end + def test_collects_nothing_if_the_statement_is_only_partially_matched + with_queries([]) do |queries| + SUBSCRIBER.finish(:name => 'SQL', :sql => 'select_db yo_mama') + assert queries.empty? + end + end + def test_collects_nothing_if_unexplained_sqls with_queries([]) do |queries| SUBSCRIBER.call(:name => 'SQL', :sql => 'SHOW max_identifier_length') |