diff options
author | Vipul A M <vipulnsward@gmail.com> | 2016-11-17 22:44:52 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2016-11-17 22:44:52 +0530 |
commit | 0085155100c04668b4d342a4f4b1beb927307640 (patch) | |
tree | 37894d61c944162591145bbd7ac3b229e84ea278 /activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb | |
parent | b9afb01283b20fefdd655ff59952bf11af559fff (diff) | |
download | rails-0085155100c04668b4d342a4f4b1beb927307640.tar.gz rails-0085155100c04668b4d342a4f4b1beb927307640.tar.bz2 rails-0085155100c04668b4d342a4f4b1beb927307640.zip |
Fix mucking of connection_config leading to issues in prepared_statements
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |