diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-11-17 18:49:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 18:49:09 +0100 |
commit | a48740deed584523b45eafcc70439681e815af32 (patch) | |
tree | 37894d61c944162591145bbd7ac3b229e84ea278 | |
parent | b9afb01283b20fefdd655ff59952bf11af559fff (diff) | |
parent | 0085155100c04668b4d342a4f4b1beb927307640 (diff) | |
download | rails-a48740deed584523b45eafcc70439681e815af32.tar.gz rails-a48740deed584523b45eafcc70439681e815af32.tar.bz2 rails-a48740deed584523b45eafcc70439681e815af32.zip |
Merge pull request #27084 from vipulnsward/fix-connection-config-mutation
Fix mucking of connection_config leading to issues in prepared_statements issues
-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 |