diff options
author | Akira Matsuda <ronnie@dio.jp> | 2014-08-20 17:49:03 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2014-08-20 17:50:11 +0900 |
commit | 9ea80288f69eb775f095d74a644bdc432984cc85 (patch) | |
tree | 49213386321bc4e71ac32addbfb643dbd155c633 /activerecord/test | |
parent | 24a9bc4fc8d0885c64e27a62fb2703416c6ab95d (diff) | |
download | rails-9ea80288f69eb775f095d74a644bdc432984cc85.tar.gz rails-9ea80288f69eb775f095d74a644bdc432984cc85.tar.bz2 rails-9ea80288f69eb775f095d74a644bdc432984cc85.zip |
Ignore Postgresql "SELECT tablename FROM pg_tables" when counting queries
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/test_case.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 4070216733..eb44c4a83c 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -94,7 +94,7 @@ module ActiveRecord # instead examining the SQL content. oracle_ignored = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO/, /^\s*select .* from all_triggers/im, /^\s*select .* from all_constraints/im, /^\s*select .* from all_tab_cols/im] mysql_ignored = [/^SHOW TABLES/i, /^SHOW FULL FIELDS/, /^SHOW CREATE TABLE /i, /^SHOW VARIABLES /] - postgresql_ignored = [/^\s*select\b.*\bfrom\b.*pg_namespace\b/im, /^\s*select\b.*\battname\b.*\bfrom\b.*\bpg_attribute\b/im, /^SHOW search_path/i] + postgresql_ignored = [/^\s*select\b.*\bfrom\b.*pg_namespace\b/im, /^\s*select tablename\b.*from pg_tables\b/im, /^\s*select\b.*\battname\b.*\bfrom\b.*\bpg_attribute\b/im, /^SHOW search_path/i] sqlite3_ignored = [/^\s*SELECT name\b.*\bFROM sqlite_master/im] [oracle_ignored, mysql_ignored, postgresql_ignored, sqlite3_ignored].each do |db_ignored_sql| |