aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/support
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2016-11-19 21:52:52 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2016-11-19 21:52:52 +0530
commit7b6b52d6bcd204aaddcdc36481956d73a54ea7bb (patch)
treeb67e9cd63fdc07f6a9d841b417be35fe2f108262 /activerecord/test/support
parentff2fe014d916a2f7c4330ca7208a857bd0ef8992 (diff)
downloadrails-7b6b52d6bcd204aaddcdc36481956d73a54ea7bb.tar.gz
rails-7b6b52d6bcd204aaddcdc36481956d73a54ea7bb.tar.bz2
rails-7b6b52d6bcd204aaddcdc36481956d73a54ea7bb.zip
Fix tests for prepared_statements: false and queries hitting `#select_all`
- The query needs to be executed for hitting `select_all` so made sure that query gets executed. - Also instead of changing instance variable, just add new configuration for prepared_statements: false and use it for this test. - This way we don't have to touch the internals of AR code and still disable prepared statements config for this test.
Diffstat (limited to 'activerecord/test/support')
-rw-r--r--activerecord/test/support/config.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/support/config.rb b/activerecord/test/support/config.rb
index 5817e427e3..e1aa8d72e3 100644
--- a/activerecord/test/support/config.rb
+++ b/activerecord/test/support/config.rb
@@ -26,7 +26,8 @@ module ARTest
def expand_config(config)
config["connections"].each do |adapter, connection|
- dbs = [["arunit", "activerecord_unittest"], ["arunit2", "activerecord_unittest2"]]
+ dbs = [["arunit", "activerecord_unittest"], ["arunit2", "activerecord_unittest2"],
+ ["arunit_with_prepared_statements", "activerecord_unittest"]]
dbs.each do |name, dbname|
unless connection[name].is_a?(Hash)
connection[name] = { "database" => connection[name] }