diff --git a/test/explain_test.rb b/test/explain_test.rb index 2bd3e478a..d605f6f4a 100644 --- a/test/explain_test.rb +++ b/test/explain_test.rb @@ -32,12 +32,8 @@ def test_explain_multiple_statements end def with_explain_timeout(value) - previous_value = PgHero.explain_timeout_sec - begin - PgHero.explain_timeout_sec = value + PgHero.stub(:explain_timeout_sec, value) do yield - ensure - PgHero.explain_timeout_sec = previous_value end end end