summaryrefslogtreecommitdiff
path: root/spec/bundler/commands
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-04 13:10:58 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-04 13:10:58 +0000
commite97741e12a22d78825a3a9dfcb7382adb0e27855 (patch)
tree5344cb31a89df6fd5fbae92740d4229d655eee8f /spec/bundler/commands
parent4bbbbb6a3f5bd242f740041a644311f97c4a0052 (diff)
Merge Bundler 2.0.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r--spec/bundler/commands/binstubs_spec.rb29
-rw-r--r--spec/bundler/commands/check_spec.rb6
-rw-r--r--spec/bundler/commands/clean_spec.rb8
-rw-r--r--spec/bundler/commands/console_spec.rb2
-rw-r--r--spec/bundler/commands/exec_spec.rb48
-rw-r--r--spec/bundler/commands/init_spec.rb18
-rw-r--r--spec/bundler/commands/inject_spec.rb4
-rw-r--r--spec/bundler/commands/install_spec.rb8
-rw-r--r--spec/bundler/commands/list_spec.rb2
-rw-r--r--spec/bundler/commands/outdated_spec.rb2
-rw-r--r--spec/bundler/commands/package_spec.rb2
-rw-r--r--spec/bundler/commands/pristine_spec.rb2
-rw-r--r--spec/bundler/commands/show_spec.rb10
-rw-r--r--spec/bundler/commands/update_spec.rb28
-rw-r--r--spec/bundler/commands/version_spec.rb12
-rw-r--r--spec/bundler/commands/viz_spec.rb2
16 files changed, 88 insertions, 95 deletions
diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb
index 6a705d3423..7f2e81c099 100644
--- a/spec/bundler/commands/binstubs_spec.rb
+++ b/spec/bundler/commands/binstubs_spec.rb
@@ -134,6 +134,33 @@ RSpec.describe "bundle binstubs <gem>" do
if ENV["BUNDLER_SPEC_SUB_VERSION"]
let(:system_bundler_version) { Bundler::VERSION }
end
+
+ before do
+ gemfile <<-G
+ source "file:///Users/colby/Projects/bundler/tmp/gems/remote2"
+ gem "rack"
+ gem "prints_loaded_gems"
+ G
+
+ lockfile <<-G
+ GEM
+ remote: file:///Users/colby/Projects/bundler/tmp/gems/remote2/
+ specs:
+ prints_loaded_gems (1.0)
+ rack (1.2)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ prints_loaded_gems
+ rack
+
+ BUNDLED WITH
+ #{system_bundler_version}
+ G
+ end
+
it "runs bundler" do
sys_exec! "#{bundled_app("bin/bundle")} install"
expect(out).to eq %(system bundler #{system_bundler_version}\n["install"])
@@ -313,7 +340,7 @@ RSpec.describe "bundle binstubs <gem>" do
expect(bundled_app("exec/rackup")).to exist
end
- it "setting is saved for bundle install", :bundler => "< 2" do
+ it "setting is saved for bundle install", :bundler => "< 3" do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb
index f2af446fbf..890f4b1356 100644
--- a/spec/bundler/commands/check_spec.rb
+++ b/spec/bundler/commands/check_spec.rb
@@ -92,7 +92,7 @@ RSpec.describe "bundle check" do
expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
end
- it "remembers --without option from install", :bundler => "< 2" do
+ it "remembers --without option from install", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
group :foo do
@@ -238,7 +238,7 @@ RSpec.describe "bundle check" do
expect(last_command).to be_failure
end
- context "--path", :bundler => "< 2" do
+ context "--path", :bundler => "< 3" do
before do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -254,7 +254,7 @@ RSpec.describe "bundle check" do
expect(out).to include("The Gemfile's dependencies are satisfied")
end
- it "should write to .bundle/config", :bundler => "< 2" do
+ it "should write to .bundle/config", :bundler => "< 3" do
bundle "check --path vendor/bundle"
bundle! "check"
end
diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb
index 37cbeeb4e7..158d58d67c 100644
--- a/spec/bundler/commands/clean_spec.rb
+++ b/spec/bundler/commands/clean_spec.rb
@@ -142,7 +142,7 @@ RSpec.describe "bundle clean" do
bundle :clean
digest = Digest(:SHA1).hexdigest(git_path.to_s)
- cache_path = Bundler::VERSION.start_with?("1.") ? vendored_gems("cache/bundler/git/foo-1.0-#{digest}") : home(".bundle/cache/git/foo-1.0-#{digest}")
+ cache_path = Bundler.bundler_major_version < 3 ? vendored_gems("cache/bundler/git/foo-1.0-#{digest}") : home(".bundle/cache/git/foo-1.0-#{digest}")
expect(cache_path).to exist
end
@@ -343,7 +343,7 @@ RSpec.describe "bundle clean" do
expect(out).to include("rack (1.0.0)").and include("thin (1.0)")
end
- it "--clean should override the bundle setting on install", :bundler => "< 2" do
+ it "--clean should override the bundle setting on install", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -363,7 +363,7 @@ RSpec.describe "bundle clean" do
should_not_have_gems "thin-1.0"
end
- it "--clean should override the bundle setting on update", :bundler => "< 2" do
+ it "--clean should override the bundle setting on update", :bundler => "< 3" do
build_repo2
gemfile <<-G
@@ -383,7 +383,7 @@ RSpec.describe "bundle clean" do
should_not_have_gems "foo-1.0"
end
- it "automatically cleans when path has not been set", :bundler => "2" do
+ it "automatically cleans when path has not been set", :bundler => "3" do
build_repo2
install_gemfile! <<-G
diff --git a/spec/bundler/commands/console_spec.rb b/spec/bundler/commands/console_spec.rb
index 9bf66e8f5b..05b0a6c1e4 100644
--- a/spec/bundler/commands/console_spec.rb
+++ b/spec/bundler/commands/console_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle console", :bundler => "< 2" do
+RSpec.describe "bundle console", :bundler => "< 3" do
before :each do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb
index 6835305d55..2e3cb6621e 100644
--- a/spec/bundler/commands/exec_spec.rb
+++ b/spec/bundler/commands/exec_spec.rb
@@ -570,22 +570,7 @@ RSpec.describe "bundle exec" do
it_behaves_like "it runs"
end
- context "the executable is empty", :bundler => "< 2" do
- let(:executable) { "" }
-
- let(:exit_code) { 0 }
- let(:expected) { "#{path} is empty" }
- let(:expected_err) { "" }
- if LessThanProc.with(RUBY_VERSION).call("1.9")
- # Kernel#exec in ruby < 1.9 will raise Errno::ENOEXEC if the command content is empty,
- # even if the command is set as an executable.
- pending "Kernel#exec is different"
- else
- it_behaves_like "it runs"
- end
- end
-
- context "the executable is empty", :bundler => "2" do
+ context "the executable is empty" do
let(:executable) { "" }
let(:exit_code) { 0 }
@@ -594,18 +579,7 @@ RSpec.describe "bundle exec" do
it_behaves_like "it runs"
end
- context "the executable raises", :bundler => "< 2" do
- let(:executable) { super() << "\nraise 'ERROR'" }
- let(:exit_code) { 1 }
- let(:expected) { super() << "\nbundler: failed to load command: #{path} (#{path})" }
- let(:expected_err) do
- "RuntimeError: ERROR\n #{path}:10" +
- (Bundler.current_ruby.ruby_18? ? "" : ":in `<top (required)>'")
- end
- it_behaves_like "it runs"
- end
-
- context "the executable raises", :bundler => "2" do
+ context "the executable raises" do
let(:executable) { super() << "\nraise 'ERROR'" }
let(:exit_code) { 1 }
let(:expected_err) do
@@ -615,16 +589,7 @@ RSpec.describe "bundle exec" do
it_behaves_like "it runs"
end
- context "the executable raises an error without a backtrace", :bundler => "< 2" do
- let(:executable) { super() << "\nclass Err < Exception\ndef backtrace; end;\nend\nraise Err" }
- let(:exit_code) { 1 }
- let(:expected) { super() << "\nbundler: failed to load command: #{path} (#{path})" }
- let(:expected_err) { "Err: Err" }
-
- it_behaves_like "it runs"
- end
-
- context "the executable raises an error without a backtrace", :bundler => "2" do
+ context "the executable raises an error without a backtrace" do
let(:executable) { super() << "\nclass Err < Exception\ndef backtrace; end;\nend\nraise Err" }
let(:exit_code) { 1 }
let(:expected_err) { "bundler: failed to load command: #{path} (#{path})\nErr: Err" }
@@ -638,7 +603,7 @@ RSpec.describe "bundle exec" do
it_behaves_like "it runs"
end
- context "when Bundler.setup fails", :bundler => "< 2" do
+ context "when Bundler.setup fails", :bundler => "< 3" do
before do
gemfile <<-G
gem 'rack', '2'
@@ -655,7 +620,7 @@ RSpec.describe "bundle exec" do
it_behaves_like "it runs"
end
- context "when Bundler.setup fails", :bundler => "2" do
+ context "when Bundler.setup fails", :bundler => "3" do
before do
gemfile <<-G
gem 'rack', '2'
@@ -800,10 +765,11 @@ __FILE__: #{path.to_s.inspect}
it "overrides disable_shared_gems so bundler can be found" do
skip "bundler 1.16.x is not support with Ruby 2.6 on Travis CI" if RUBY_VERSION >= "2.6"
+ system_gems :bundler
file = bundled_app("file_that_bundle_execs.rb")
create_file(file, <<-RB)
#!#{Gem.ruby}
- puts `bundle exec echo foo`
+ puts `#{system_bundle_bin_path} exec echo foo`
RB
file.chmod(0o777)
bundle! "exec #{file}", :system_bundler => true
diff --git a/spec/bundler/commands/init_spec.rb b/spec/bundler/commands/init_spec.rb
index 9b5bd95814..8a8f0effa0 100644
--- a/spec/bundler/commands/init_spec.rb
+++ b/spec/bundler/commands/init_spec.rb
@@ -1,19 +1,19 @@
# frozen_string_literal: true
RSpec.describe "bundle init" do
- it "generates a Gemfile", :bundler => "< 2" do
+ it "generates a Gemfile", :bundler => "< 3" do
bundle! :init
expect(out).to include("Writing new Gemfile")
expect(bundled_app("Gemfile")).to be_file
end
- it "generates a gems.rb", :bundler => "2" do
+ it "generates a gems.rb", :bundler => "3" do
bundle! :init
expect(out).to include("Writing new gems.rb")
expect(bundled_app("gems.rb")).to be_file
end
- context "when a Gemfile already exists", :bundler => "< 2" do
+ context "when a Gemfile already exists", :bundler => "< 3" do
before do
create_file "Gemfile", <<-G
gem "rails"
@@ -30,7 +30,7 @@ RSpec.describe "bundle init" do
end
end
- context "when gems.rb already exists", :bundler => ">= 2" do
+ context "when gems.rb already exists", :bundler => ">= 3" do
before do
create_file("gems.rb", <<-G)
gem "rails"
@@ -47,7 +47,7 @@ RSpec.describe "bundle init" do
end
end
- context "when a Gemfile exists in a parent directory", :bundler => "< 2" do
+ context "when a Gemfile exists in a parent directory", :bundler => "< 3" do
let(:subdir) { "child_dir" }
it "lets users generate a Gemfile in a child directory" do
@@ -82,7 +82,7 @@ RSpec.describe "bundle init" do
end
end
- context "when a gems.rb file exists in a parent directory", :bundler => ">= 2" do
+ context "when a gems.rb file exists in a parent directory", :bundler => ">= 3" do
let(:subdir) { "child_dir" }
it "lets users generate a Gemfile in a child directory" do
@@ -99,7 +99,7 @@ RSpec.describe "bundle init" do
end
end
- context "given --gemspec option", :bundler => "< 2" do
+ context "given --gemspec option", :bundler => "< 3" do
let(:spec_file) { tmp.join("test.gemspec") }
it "should generate from an existing gemspec" do
@@ -115,7 +115,7 @@ RSpec.describe "bundle init" do
bundle :init, :gemspec => spec_file
- gemfile = if Bundler::VERSION[0, 2] == "1."
+ gemfile = if Bundler::VERSION[0, 2].to_i < 3
bundled_app("Gemfile").read
else
bundled_app("gems.rb").read
@@ -146,7 +146,7 @@ RSpec.describe "bundle init" do
context "when init_gems_rb setting is enabled" do
before { bundle "config init_gems_rb true" }
- context "given --gemspec option", :bundler => "< 2" do
+ context "given --gemspec option", :bundler => "< 3" do
let(:spec_file) { tmp.join("test.gemspec") }
before do
diff --git a/spec/bundler/commands/inject_spec.rb b/spec/bundler/commands/inject_spec.rb
index b7ffc89a34..d091e01380 100644
--- a/spec/bundler/commands/inject_spec.rb
+++ b/spec/bundler/commands/inject_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle inject", :bundler => "< 2" do
+RSpec.describe "bundle inject", :bundler => "< 3" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -79,7 +79,7 @@ Usage: "bundle inject GEM VERSION"
context "when frozen" do
before do
bundle "install"
- if Bundler.feature_flag.bundler_2_mode?
+ if Bundler.feature_flag.bundler_3_mode?
bundle! "config --local deployment true"
else
bundle! "config --local frozen true"
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 394f672fef..326f98161e 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -29,7 +29,7 @@ RSpec.describe "bundle install with gem sources" do
expect(bundled_app("Gemfile.lock")).to exist
end
- it "does not create ./.bundle by default", :bundler => "< 2" do
+ it "does not create ./.bundle by default", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
@@ -275,14 +275,14 @@ RSpec.describe "bundle install with gem sources" do
expect(the_bundle).to include_gems "rack 1.0"
end
- it "allows running bundle install --system without deleting foo", :bundler => "< 2" do
+ it "allows running bundle install --system without deleting foo", :bundler => "< 3" do
bundle "install", forgotten_command_line_options(:path => "vendor")
bundle "install", forgotten_command_line_options(:system => true)
FileUtils.rm_rf(bundled_app("vendor"))
expect(the_bundle).to include_gems "rack 1.0"
end
- it "allows running bundle install --system after deleting foo", :bundler => "< 2" do
+ it "allows running bundle install --system after deleting foo", :bundler => "< 3" do
bundle "install", forgotten_command_line_options(:path => "vendor")
FileUtils.rm_rf(bundled_app("vendor"))
bundle "install", forgotten_command_line_options(:system => true)
@@ -290,7 +290,7 @@ RSpec.describe "bundle install with gem sources" do
end
end
- it "finds gems in multiple sources", :bundler => "< 2" do
+ it "finds gems in multiple sources", :bundler => "< 3" do
build_repo2
update_repo2
diff --git a/spec/bundler/commands/list_spec.rb b/spec/bundler/commands/list_spec.rb
index 5305176c65..ba4bb9b040 100644
--- a/spec/bundler/commands/list_spec.rb
+++ b/spec/bundler/commands/list_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle list", :bundler => "2" do
+RSpec.describe "bundle list", :bundler => "3" do
before do
install_gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/bundler/commands/outdated_spec.rb b/spec/bundler/commands/outdated_spec.rb
index fc1f1772e7..c9d3ac1de4 100644
--- a/spec/bundler/commands/outdated_spec.rb
+++ b/spec/bundler/commands/outdated_spec.rb
@@ -407,7 +407,7 @@ RSpec.describe "bundle outdated" do
expect(out).to include("Installing foo 1.0")
end
- context "after bundle install --deployment", :bundler => "< 2" do
+ context "after bundle install --deployment", :bundler => "< 3" do
before do
install_gemfile <<-G, forgotten_command_line_options(:deployment => true)
source "file://#{gem_repo2}"
diff --git a/spec/bundler/commands/package_spec.rb b/spec/bundler/commands/package_spec.rb
index 6351909bc7..a8426e6322 100644
--- a/spec/bundler/commands/package_spec.rb
+++ b/spec/bundler/commands/package_spec.rb
@@ -141,7 +141,7 @@ RSpec.describe "bundle package" do
end
end
- context "with --path", :bundler => "< 2" do
+ context "with --path", :bundler => "< 3" do
it "sets root directory for gems" do
gemfile <<-D
source "file://#{gem_repo1}"
diff --git a/spec/bundler/commands/pristine_spec.rb b/spec/bundler/commands/pristine_spec.rb
index 0bfc37560a..d8761bba26 100644
--- a/spec/bundler/commands/pristine_spec.rb
+++ b/spec/bundler/commands/pristine_spec.rb
@@ -49,7 +49,7 @@ RSpec.describe "bundle pristine", :ruby_repo do
bundle! "pristine", :system_bundler => true
bundle! "-v", :system_bundler => true
- expected = if Bundler::VERSION < "2.0"
+ expected = if Bundler::VERSION < "3.0"
"Bundler version"
else
Bundler::VERSION
diff --git a/spec/bundler/commands/show_spec.rb b/spec/bundler/commands/show_spec.rb
index efbe4b13fb..a5c6beec1a 100644
--- a/spec/bundler/commands/show_spec.rb
+++ b/spec/bundler/commands/show_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do
+RSpec.describe "bundle show", :bundler => "< 3", :ruby => ">= 2.0" do
context "with a standard Gemfile" do
before :each do
install_gemfile <<-G
@@ -36,7 +36,7 @@ RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do
it "prints path if gem exists in bundle" do
bundle "show rails"
expect(out).to eq(
- "[DEPRECATED FOR 2.0] use `bundle info rails` instead of `bundle show rails`\n" +
+ "[DEPRECATED FOR 3.0] use `bundle info rails` instead of `bundle show rails`\n" +
default_bundle_path("gems", "rails-2.3.2").to_s
)
end
@@ -44,7 +44,7 @@ RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do
it "prints the path to the running bundler" do
bundle "show bundler"
expect(out).to eq(
- "[DEPRECATED FOR 2.0] use `bundle info bundler` instead of `bundle show bundler`\n" +
+ "[DEPRECATED FOR 3.0] use `bundle info bundler` instead of `bundle show bundler`\n" +
root.to_s
)
end
@@ -52,7 +52,7 @@ RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do
it "prints path if gem exists in bundle (with --paths option)" do
bundle "show rails --paths"
expect(out).to eq(
- "[DEPRECATED FOR 2.0] use `bundle info rails --path` instead of `bundle show rails --paths`\n" +
+ "[DEPRECATED FOR 3.0] use `bundle info rails --path` instead of `bundle show rails --paths`\n" +
default_bundle_path("gems", "rails-2.3.2").to_s
)
end
@@ -64,7 +64,7 @@ RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do
expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
out_lines = out.split("\n")
- expect(out_lines[0]).to eq("[DEPRECATED FOR 2.0] use `bundle list` instead of `bundle show --paths`")
+ expect(out_lines[0]).to eq("[DEPRECATED FOR 3.0] use `bundle list` instead of `bundle show --paths`")
# Gem names are the last component of their path.
gem_list = out_lines[1..-1].map {|p| p.split("/").last }
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb
index 6eb49d3acd..1effba6526 100644
--- a/spec/bundler/commands/update_spec.rb
+++ b/spec/bundler/commands/update_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe "bundle update" do
G
end
- describe "with no arguments", :bundler => "< 2" do
+ describe "with no arguments", :bundler => "< 3" do
it "updates the entire bundle" do
update_repo2 do
build_gem "activesupport", "3.0"
@@ -34,7 +34,7 @@ RSpec.describe "bundle update" do
end
end
- describe "with --all", :bundler => "2" do
+ describe "with --all", :bundler => "3" do
it "updates the entire bundle" do
update_repo2 do
build_gem "activesupport", "3.0"
@@ -279,7 +279,7 @@ RSpec.describe "bundle update" do
end
describe "in a frozen bundle" do
- it "should fail loudly", :bundler => "< 2" do
+ it "should fail loudly", :bundler => "< 3" do
bundle! "install --deployment"
bundle "update", :all => bundle_update_requires_all?
@@ -288,14 +288,14 @@ RSpec.describe "bundle update" do
expect(out).to match(/freeze \nby running `bundle install --no-deployment`./m)
end
- it "should suggest different command when frozen is set globally", :bundler => "< 2" do
+ it "should suggest different command when frozen is set globally", :bundler => "< 3" do
bundle! "config --global frozen 1"
bundle "update", :all => bundle_update_requires_all?
expect(out).to match(/You are trying to install in deployment mode after changing.your Gemfile/m).
and match(/freeze \nby running `bundle config --delete frozen`./m)
end
- it "should suggest different command when frozen is set globally", :bundler => "2" do
+ it "should suggest different command when frozen is set globally", :bundler => "3" do
bundle! "config --global deployment true"
bundle "update", :all => bundle_update_requires_all?
expect(out).to match(/You are trying to install in deployment mode after changing.your Gemfile/m).
@@ -304,7 +304,7 @@ RSpec.describe "bundle update" do
end
describe "with --source option" do
- it "should not update gems not included in the source that happen to have the same name", :bundler => "< 2" do
+ it "should not update gems not included in the source that happen to have the same name", :bundler => "< 3" do
install_gemfile! <<-G
source "file://#{gem_repo2}"
gem "activesupport"
@@ -315,7 +315,7 @@ RSpec.describe "bundle update" do
expect(the_bundle).to include_gem "activesupport 3.0"
end
- it "should not update gems not included in the source that happen to have the same name", :bundler => "2" do
+ it "should not update gems not included in the source that happen to have the same name", :bundler => "3" do
install_gemfile! <<-G
source "file://#{gem_repo2}"
gem "activesupport"
@@ -358,7 +358,7 @@ RSpec.describe "bundle update" do
G
end
- it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 2" do
+ it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 3" do
update_repo2 do
build_gem "fred", "2.0"
build_gem "harry", "2.0" do |s|
@@ -371,7 +371,7 @@ RSpec.describe "bundle update" do
expect(the_bundle).to include_gems "fred 1.0"
end
- it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "2" do
+ it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "3" do
update_repo2 do
build_gem "fred", "2.0"
build_gem "harry", "2.0" do |s|
@@ -403,7 +403,7 @@ RSpec.describe "bundle update" do
G
end
- it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 2" do
+ it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 3" do
update_repo2 do
build_gem "george", "2.0"
build_gem "harry", "2.0" do |s|
@@ -417,7 +417,7 @@ RSpec.describe "bundle update" do
expect(the_bundle).to include_gems "george 1.0"
end
- it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "2" do
+ it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "3" do
update_repo2 do
build_gem "george", "2.0"
build_gem "harry", "2.0" do |s|
@@ -561,14 +561,14 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler"
G
end
- it "should explain that bundler conflicted", :bundler => "< 2" do
+ it "should explain that bundler conflicted", :bundler => "< 3" do
bundle "update", :all => bundle_update_requires_all?
expect(last_command.stdboth).not_to match(/in snapshot/i)
expect(last_command.bundler_err).to match(/current Bundler version/i).
and match(/perhaps you need to update bundler/i)
end
- it "should warn that the newer version of Bundler would conflict", :bundler => "2" do
+ it "should warn that the newer version of Bundler would conflict", :bundler => "3" do
bundle! "update", :all => true
expect(last_command.bundler_err).to include("rails (3.0.1) has dependency bundler").
and include("so the dependency is being ignored")
@@ -577,7 +577,7 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler"
end
RSpec.describe "bundle update" do
- it "shows the previous version of the gem when updated from rubygems source", :bundler => "< 2" do
+ it "shows the previous version of the gem when updated from rubygems source", :bundler => "< 3" do
build_repo2
install_gemfile <<-G
diff --git a/spec/bundler/commands/version_spec.rb b/spec/bundler/commands/version_spec.rb
index b919c25e0f..66c7930397 100644
--- a/spec/bundler/commands/version_spec.rb
+++ b/spec/bundler/commands/version_spec.rb
@@ -2,36 +2,36 @@
RSpec.describe "bundle version" do
context "with -v" do
- it "outputs the version", :bundler => "< 2" do
+ it "outputs the version", :bundler => "< 3" do
bundle! "-v"
expect(out).to eq("Bundler version #{Bundler::VERSION}")
end
- it "outputs the version", :bundler => "2" do
+ it "outputs the version", :bundler => "3" do
bundle! "-v"
expect(out).to eq(Bundler::VERSION)
end
end
context "with --version" do
- it "outputs the version", :bundler => "< 2" do
+ it "outputs the version", :bundler => "< 3" do
bundle! "--version"
expect(out).to eq("Bundler version #{Bundler::VERSION}")
end
- it "outputs the version", :bundler => "2" do
+ it "outputs the version", :bundler => "3" do
bundle! "--version"
expect(out).to eq(Bundler::VERSION)
end
end
context "with version" do
- it "outputs the version with build metadata", :bundler => "< 2" do
+ it "outputs the version with build metadata", :bundler => "< 3" do
bundle! "version"
expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit [a-fA-F0-9]{7,}\)\z/)
end
- it "outputs the version with build metadata", :bundler => "2" do
+ it "outputs the version with build metadata", :bundler => "3" do
bundle! "version"
expect(out).to match(/\A#{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit [a-fA-F0-9]{7,}\)\z/)
end
diff --git a/spec/bundler/commands/viz_spec.rb b/spec/bundler/commands/viz_spec.rb
index 3804d3561c..61414956a9 100644
--- a/spec/bundler/commands/viz_spec.rb
+++ b/spec/bundler/commands/viz_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 2", :if => Bundler.which("dot") do
+RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 3", :if => Bundler.which("dot") do
let(:ruby_graphviz) do
graphviz_glob = base_system_gems.join("cache/ruby-graphviz*")
Pathname.glob(graphviz_glob).first