[rubygems/rubygems] Fix bundle cache path=foo not printing a deprecation message

0af03eea5d
This commit is contained in:
David Rodríguez 2025-07-15 21:09:51 +02:00 committed by Hiroshi SHIBATA
parent 249cf5397f
commit 19d931b50d
2 changed files with 28 additions and 4 deletions

View file

@ -199,6 +199,28 @@ RSpec.describe "major deprecations" do
pending "fails with a helpful error", bundler: "4"
end
context "bundle cache --path=" do
before do
install_gemfile <<-G
source "https://gem.repo1"
gem "myrack"
G
bundle "cache --path=foo", raise_on_error: false
end
it "should print a deprecation warning" do
expect(deprecations).to include(
"The `--path` flag is deprecated because its semantics are unclear. " \
"Use `bundle config cache_path` to configure the path of your cache of gems, " \
"and `bundle config path` to configure the path where your gems are installed, " \
"and stop using this flag"
)
end
pending "fails with a helpful error", bundler: "4"
end
describe "bundle config" do
describe "old list interface" do
before do