aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/install/gems/standalone_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/install/gems/standalone_spec.rb
parent61b61f426a796871c27a0a9e4eedb31057864165 (diff)
downloadruby-e413e746afd20a7a0629c3e3c572d6d3dffc1c16.tar.gz
[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
Diffstat (limited to 'spec/bundler/install/gems/standalone_spec.rb')
-rw-r--r--spec/bundler/install/gems/standalone_spec.rb37
1 files changed, 25 insertions, 12 deletions
diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb
index c45ecd52ec..8cb6cd6588 100644
--- a/spec/bundler/install/gems/standalone_spec.rb
+++ b/spec/bundler/install/gems/standalone_spec.rb
@@ -55,7 +55,8 @@ RSpec.shared_examples "bundle install --standalone" do
source "#{file_uri_for(gem_repo1)}"
gem "rails"
G
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => true, :dir => cwd
end
let(:expected_gems) do
@@ -70,7 +71,8 @@ RSpec.shared_examples "bundle install --standalone" do
describe "with gems with native extension", :ruby_repo do
before do
- install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ install_gemfile <<-G, :standalone => true, :dir => cwd
source "#{file_uri_for(gem_repo1)}"
gem "very_simple_binary"
G
@@ -103,7 +105,8 @@ RSpec.shared_examples "bundle install --standalone" do
end
G
end
- install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ install_gemfile <<-G, :standalone => true, :dir => cwd
gem "bar", :git => "#{lib_path("bar-1.0")}"
G
end
@@ -123,7 +126,8 @@ RSpec.shared_examples "bundle install --standalone" do
gem "rails"
gem "devise", :git => "#{lib_path("devise-1.0")}"
G
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => true, :dir => cwd
end
let(:expected_gems) do
@@ -150,7 +154,8 @@ RSpec.shared_examples "bundle install --standalone" do
gem "rack-test"
end
G
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => true, :dir => cwd
end
let(:expected_gems) do
@@ -163,7 +168,8 @@ RSpec.shared_examples "bundle install --standalone" do
include_examples "common functionality"
it "allows creating a standalone file with limited groups" do
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => "default", :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => "default", :dir => cwd
load_error_ruby <<-RUBY, "spec"
$:.unshift File.expand_path("bundle")
@@ -179,7 +185,9 @@ RSpec.shared_examples "bundle install --standalone" do
end
it "allows `without` configuration to limit the groups used in a standalone" do
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle"), :without => "test").merge(:standalone => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle "config --local without test"
+ bundle! :install, :standalone => true, :dir => cwd
load_error_ruby <<-RUBY, "spec"
$:.unshift File.expand_path("bundle")
@@ -195,7 +203,8 @@ RSpec.shared_examples "bundle install --standalone" do
end
it "allows `path` configuration to change the location of the standalone bundle" do
- bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true, :dir => cwd)
+ bundle "config --local path path/to/bundle"
+ bundle! "install", :standalone => true, :dir => cwd
ruby <<-RUBY
$:.unshift File.expand_path("path/to/bundle")
@@ -209,8 +218,10 @@ RSpec.shared_examples "bundle install --standalone" do
end
it "allows `without` to limit the groups used in a standalone" do
- bundle! :install, forgotten_command_line_options(:without => "test").merge(:dir => cwd)
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)
+ bundle "config --local without test"
+ bundle! :install, :dir => cwd
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => true, :dir => cwd
load_error_ruby <<-RUBY, "spec"
$:.unshift File.expand_path("bundle")
@@ -235,7 +246,8 @@ RSpec.shared_examples "bundle install --standalone" do
source "#{source_uri}"
gem "rails"
G
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :artifice => "endpoint", :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => true, :artifice => "endpoint", :dir => cwd
end
let(:expected_gems) do
@@ -255,7 +267,8 @@ RSpec.shared_examples "bundle install --standalone" do
source "#{file_uri_for(gem_repo1)}"
gem "rails"
G
- bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :binstubs => true, :dir => cwd)
+ bundle "config --local path #{bundled_app("bundle")}"
+ bundle! :install, :standalone => true, :binstubs => true, :dir => cwd
end
let(:expected_gems) do