summaryrefslogtreecommitdiff
path: root/spec/bundler/install/gemfile
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/gemfile
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/install/gemfile')
-rw-r--r--spec/bundler/install/gemfile/eval_gemfile_spec.rb3
-rw-r--r--spec/bundler/install/gemfile/gemspec_spec.rb6
-rw-r--r--spec/bundler/install/gemfile/git_spec.rb3
-rw-r--r--spec/bundler/install/gemfile/path_spec.rb3
-rw-r--r--spec/bundler/install/gemfile/platform_spec.rb3
-rw-r--r--spec/bundler/install/gemfile/sources_spec.rb6
6 files changed, 16 insertions, 8 deletions
diff --git a/spec/bundler/install/gemfile/eval_gemfile_spec.rb b/spec/bundler/install/gemfile/eval_gemfile_spec.rb
index 44cf052895..59b2932fff 100644
--- a/spec/bundler/install/gemfile/eval_gemfile_spec.rb
+++ b/spec/bundler/install/gemfile/eval_gemfile_spec.rb
@@ -47,7 +47,8 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do
# parsed lockfile and the evaluated gemfile.
it "bundles with deployment mode configured" do
bundle! :install
- bundle! :install, forgotten_command_line_options(:deployment => true)
+ bundle "config --local deployment true"
+ bundle! :install
end
end
diff --git a/spec/bundler/install/gemfile/gemspec_spec.rb b/spec/bundler/install/gemfile/gemspec_spec.rb
index 2ccbc1f3cc..c4a5ea9fe1 100644
--- a/spec/bundler/install/gemfile/gemspec_spec.rb
+++ b/spec/bundler/install/gemfile/gemspec_spec.rb
@@ -290,7 +290,8 @@ RSpec.describe "bundle install from an existing gemspec" do
s.add_dependency "activesupport", ">= 1.0.1"
end
- bundle :install, forgotten_command_line_options(:deployment => true)
+ bundle "config --local deployment true"
+ bundle :install
expect(err).to include("changed")
end
@@ -558,7 +559,8 @@ RSpec.describe "bundle install from an existing gemspec" do
it "installs the ruby platform gemspec and skips dev deps with `without development` configured" do
simulate_platform "ruby"
- install_gemfile! <<-G, forgotten_command_line_options(:without => "development")
+ bundle "config --local without development"
+ install_gemfile! <<-G
source "#{file_uri_for(gem_repo1)}"
gemspec :path => '#{tmp.join("foo")}', :name => 'foo'
G
diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb
index d495ca2395..3c34bd4477 100644
--- a/spec/bundler/install/gemfile/git_spec.rb
+++ b/spec/bundler/install/gemfile/git_spec.rb
@@ -1043,7 +1043,8 @@ RSpec.describe "bundle install with git sources" do
simulate_new_machine
- bundle! :install, forgotten_command_line_options(:deployment => true)
+ bundle "config --local deployment true"
+ bundle! :install
end
end
diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb
index a733c02512..2625ab3e02 100644
--- a/spec/bundler/install/gemfile/path_spec.rb
+++ b/spec/bundler/install/gemfile/path_spec.rb
@@ -131,7 +131,8 @@ RSpec.describe "bundle install with explicit source paths" do
gem 'foo', :path => File.expand_path("../foo-1.0", __FILE__)
G
- bundle! :install, forgotten_command_line_options(:frozen => true)
+ bundle "config --local frozen true"
+ bundle! :install
expect(exitstatus).to eq(0) if exitstatus
end
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb
index e33cb29ef8..65ea2bee07 100644
--- a/spec/bundler/install/gemfile/platform_spec.rb
+++ b/spec/bundler/install/gemfile/platform_spec.rb
@@ -263,7 +263,8 @@ RSpec.describe "bundle install across platforms" do
gem "rack", "1.0.0"
G
- bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+ bundle "config --local path vendor/bundle"
+ bundle! :install
FileUtils.mv(vendored_gems, bundled_app("vendor/bundle", Gem.ruby_engine, "1.8"))
diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb
index 6e29d786f1..0176f112d4 100644
--- a/spec/bundler/install/gemfile/sources_spec.rb
+++ b/spec/bundler/install/gemfile/sources_spec.rb
@@ -107,7 +107,8 @@ RSpec.describe "bundle install with gems on multiple sources" do
expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
expect(bundled_app("vendor/cache/rack-obama-1.0.gem")).to exist
- bundle! :install, forgotten_command_line_options(:deployment => true)
+ bundle "config --local deployment true"
+ bundle! :install
expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0")
end
@@ -485,7 +486,8 @@ RSpec.describe "bundle install with gems on multiple sources" do
gem 'bar', '~> 0.1', :source => '#{file_uri_for(gem_repo4)}'
G
- bundle! :install, forgotten_command_line_options(:path => "../gems/system")
+ bundle "config --local path ../gems/system"
+ bundle! :install
# And then we add some new versions...
update_repo4 do