From d74fb78db43be0bbed06abc5b9dd798c01757310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 14 Nov 2023 18:46:08 +0100 Subject: [PATCH 1/2] Fix one more `and_call_original`-related flaky spec (#8392) --- bundler/spec/dependabot/bundler/update_checker_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/spec/dependabot/bundler/update_checker_spec.rb b/bundler/spec/dependabot/bundler/update_checker_spec.rb index dfb2f54f24..27b42e900f 100644 --- a/bundler/spec/dependabot/bundler/update_checker_spec.rb +++ b/bundler/spec/dependabot/bundler/update_checker_spec.rb @@ -163,7 +163,7 @@ function: "dependency_source_type", options: anything, args: anything - }).and_call_original + }).and_return("private") allow(Dependabot::Bundler::NativeHelpers) .to receive(:run_bundler_subprocess) From 3571625a7b55cd34da484abe4e1e509bedc99bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 14 Nov 2023 20:07:27 +0100 Subject: [PATCH 2/2] Fix more Sorbet + `and_call_original` issues (#8394) --- .../update_checker/pip_compile_version_resolver_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/spec/dependabot/python/update_checker/pip_compile_version_resolver_spec.rb b/python/spec/dependabot/python/update_checker/pip_compile_version_resolver_spec.rb index 5c1ce44f50..b95b08004e 100644 --- a/python/spec/dependabot/python/update_checker/pip_compile_version_resolver_spec.rb +++ b/python/spec/dependabot/python/update_checker/pip_compile_version_resolver_spec.rb @@ -394,7 +394,9 @@ context "because it ran out of disk space" do before do allow(Dependabot::SharedHelpers) - .to receive(:run_shell_command).and_call_original + .to receive(:run_shell_command) + allow(Dependabot::SharedHelpers) + .to receive(:run_shell_command).with("pyenv versions").and_return("3.11.5") allow(Dependabot::SharedHelpers) .to receive(:run_shell_command).with(a_string_matching(/pyenv exec pip-compile/), *any_args) .and_raise( @@ -414,7 +416,9 @@ context "because it ran out of memory" do before do allow(Dependabot::SharedHelpers) - .to receive(:run_shell_command).and_call_original + .to receive(:run_shell_command) + allow(Dependabot::SharedHelpers) + .to receive(:run_shell_command).with("pyenv versions").and_return("3.11.5") allow(Dependabot::SharedHelpers) .to receive(:run_shell_command).with(a_string_matching(/pyenv exec pip-compile/), *any_args) .and_raise(