Skip to content

Commit

Permalink
Fix mucking of connection_config leading to issues in prepared_statem…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
vipulnsward committed Nov 17, 2016
1 parent b9afb01 commit 0085155
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -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
Expand Down

0 comments on commit 0085155

Please sign in to comment.