From 0085155100c04668b4d342a4f4b1beb927307640 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Thu, 17 Nov 2016 22:44:52 +0530 Subject: Fix mucking of connection_config leading to issues in prepared_statements --- .../test/cases/adapters/postgresql/prepared_statements_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb b/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb index 0a4bc5113e..181c1a097c 100644 --- a/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb +++ b/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb @@ -6,12 +6,12 @@ class PreparedStatementsTest < ActiveRecord::PostgreSQLTestCase fixtures :developers def setup - @default_prepared_statements = Developer.connection_config[:prepared_statements] - Developer.connection_config[:prepared_statements] = false + @default_prepared_statements = ActiveRecord::Base.connection.instance_variable_get("@prepared_statements") + ActiveRecord::Base.connection.instance_variable_set("@prepared_statements", false) end def teardown - Developer.connection_config[:prepared_statements] = @default_prepared_statements + ActiveRecord::Base.connection.instance_variable_set("@prepared_statements", @default_prepared_statements) end def test_nothing_raised_with_falsy_prepared_statements -- cgit v1.2.3