summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/cache_spec.rb
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/commands/cache_spec.rb
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/commands/cache_spec.rb')
-rw-r--r--spec/bundler/commands/cache_spec.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb
index 09a1b8437a..33709446c1 100644
--- a/spec/bundler/commands/cache_spec.rb
+++ b/spec/bundler/commands/cache_spec.rb
@@ -221,7 +221,8 @@ RSpec.describe "bundle cache" do
end
end
- install_gemfile! <<-G, forgotten_command_line_options(:without => "wo")
+ bundle "config --local without wo"
+ install_gemfile! <<-G
source "file:#{gem_repo1}"
gem "rack"
group :wo do
@@ -236,7 +237,8 @@ RSpec.describe "bundle cache" do
expect(the_bundle).to include_gem "rack 1.0"
expect(the_bundle).not_to include_gems "weakling", "uninstallable"
- bundle! :install, forgotten_command_line_options(:without => "wo")
+ bundle "config --local without wo"
+ bundle! :install
expect(the_bundle).to include_gem "rack 1.0"
expect(the_bundle).not_to include_gems "weakling", "uninstallable"
end
@@ -251,7 +253,10 @@ RSpec.describe "bundle cache" do
bundle "install"
end
- subject { bundle :cache, forgotten_command_line_options(:frozen => true) }
+ subject do
+ bundle "config --local frozen true"
+ bundle :cache
+ end
it "tries to install with frozen" do
bundle! "config set deployment true"
@@ -299,7 +304,9 @@ RSpec.describe "bundle install with gem sources" do
simulate_new_machine
FileUtils.rm_rf gem_repo2
- bundle! :install, forgotten_command_line_options(:deployment => true, :path => "vendor/bundle")
+ bundle "config --local deployment true"
+ bundle "config --local path vendor/bundle"
+ bundle! :install
expect(the_bundle).to include_gems "rack 1.0.0"
end