From e77dea57297a58e35e5833ca84187e56d10f4bf0 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 28 Dec 2021 01:45:24 -0500 Subject: [PATCH] Use stub method [skip ci] --- test/explain_test.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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