[rubygems/rubygems] Fix bundle binstub --path=foo not printing a deprecation warning

Like others, it's a remembered option which we are deprecating in favor
of configuration.

801d5dd943
This commit is contained in:
David Rodríguez 2025-07-15 21:20:01 +02:00 committed by Hiroshi SHIBATA
parent 19d931b50d
commit 44dd27c430
2 changed files with 26 additions and 2 deletions

View file

@ -155,6 +155,28 @@ RSpec.describe "major deprecations" do
pending "fails with a helpful error", bundler: "4"
end
context "bundle binstubs --path=" do
before do
install_gemfile <<-G
source "https://gem.repo1"
gem "myrack"
G
bundle "binstubs myrack --path=binpath", raise_on_error: false
end
it "should print a deprecation warning" do
expect(deprecations).to include(
"The `--path` flag is deprecated because it relies on being " \
"remembered across bundler invocations, which bundler will no " \
"longer do in future versions. Instead please use `bundle config set " \
"bin 'binpath'`, and stop using this flag"
)
end
pending "fails with a helpful error", bundler: "4"
end
context "bundle cache --all" do
before do
install_gemfile <<-G