summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-05-29 12:46:16 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commite413e746afd20a7a0629c3e3c572d6d3dffc1c16 (patch)
treedaf21fadda38ed3ea446d2fa0131cd50cf666353 /spec/bundler/runtime
parent61b61f426a796871c27a0a9e4eedb31057864165 (diff)
[rubygems/rubygems] Remove `forgotten_command_line_usages` from specs
Instead, use the non-deprecated option except when specifically testing deprecated CLI flags. In that case, pass the flag directly and limit the specs to `bundler < 3`. https://github.com/rubygems/rubygems/commit/3d5e186241
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r--spec/bundler/runtime/setup_spec.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index c16515147e..dc1034cf04 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -481,13 +481,15 @@ RSpec.describe "Bundler.setup" do
end
it "works even when the cache directory has been deleted" do
- bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+ bundle "config --local path vendor/bundle"
+ bundle! :install
FileUtils.rm_rf vendored_gems("cache")
expect(the_bundle).to include_gems "rack 1.0.0"
end
it "does not randomly change the path when specifying --path and the bundle directory becomes read only" do
- bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+ bundle "config --local path vendor/bundle"
+ bundle! :install
with_read_only("#{bundled_app}/**/*") do
expect(the_bundle).to include_gems "rack 1.0.0"
@@ -590,7 +592,8 @@ RSpec.describe "Bundler.setup" do
describe "when excluding groups" do
it "doesn't change the resolve if --without is used" do
- install_gemfile <<-G, forgotten_command_line_options(:without => :rails)
+ bundle "config --local without rails"
+ install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "activesupport"
@@ -605,7 +608,8 @@ RSpec.describe "Bundler.setup" do
end
it "remembers --without and does not bail on bare Bundler.setup" do
- install_gemfile <<-G, forgotten_command_line_options(:without => :rails)
+ bundle "config --local without rails"
+ install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "activesupport"
@@ -620,7 +624,8 @@ RSpec.describe "Bundler.setup" do
end
it "remembers --without and does not include groups passed to Bundler.setup" do
- install_gemfile <<-G, forgotten_command_line_options(:without => :rails)
+ bundle "config --local without rails"
+ install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "activesupport"