diff options
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/binstubs_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/check_spec.rb | 6 | ||||
-rw-r--r-- | spec/commands/clean_spec.rb | 8 | ||||
-rw-r--r-- | spec/commands/console_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/exec_spec.rb | 56 | ||||
-rw-r--r-- | spec/commands/init_spec.rb | 18 | ||||
-rw-r--r-- | spec/commands/inject_spec.rb | 10 | ||||
-rw-r--r-- | spec/commands/install_spec.rb | 8 | ||||
-rw-r--r-- | spec/commands/list_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/outdated_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/package_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/pristine_spec.rb | 9 | ||||
-rw-r--r-- | spec/commands/show_spec.rb | 12 | ||||
-rw-r--r-- | spec/commands/update_spec.rb | 34 | ||||
-rw-r--r-- | spec/commands/version_spec.rb | 12 |
15 files changed, 73 insertions, 110 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 9126b29592..3f62f17b45 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -294,7 +294,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/commands/check_spec.rb b/spec/commands/check_spec.rb index aec6207c70..7114610644 100644 --- a/spec/commands/check_spec.rb +++ b/spec/commands/check_spec.rb @@ -92,7 +92,7 @@ RSpec.describe "bundle check" do expect(err).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/commands/clean_spec.rb b/spec/commands/clean_spec.rb index b7c23b8136..cd5cb932e3 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/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::VERSION.start_with?("2.") ? vendored_gems("cache/bundler/git/foo-1.0-#{digest}") : home(".bundle/cache/git/foo-1.0-#{digest}") expect(cache_path).to exist end @@ -344,7 +344,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}" @@ -364,7 +364,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 @@ -384,7 +384,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/commands/console_spec.rb b/spec/commands/console_spec.rb index 41fc56c919..cba618db80 100644 --- a/spec/commands/console_spec.rb +++ b/spec/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/commands/exec_spec.rb b/spec/commands/exec_spec.rb index bf1de25142..1d84669a75 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -621,17 +621,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) { "" } - - it_behaves_like "it runs" - end - - context "the executable is empty", :bundler => "2" do + context "the executable is empty" do let(:executable) { "" } let(:exit_code) { 0 } @@ -640,18 +630,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 @@ -661,16 +640,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" } @@ -684,25 +654,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "when Bundler.setup fails", :bundler => "< 2" do - before do - gemfile <<-G - gem 'rack', '2' - G - ENV["BUNDLER_FORCE_TTY"] = "true" - end - - let(:exit_code) { Bundler::GemNotFound.new.status_code } - let(:expected_err) { "" } - let(:expected) { <<-EOS.strip } -\e[31mCould not find gem 'rack (= 2)' in any of the gem sources listed in your Gemfile.\e[0m -\e[33mRun `bundle install` to install missing gems.\e[0m - EOS - - 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' diff --git a/spec/commands/init_spec.rb b/spec/commands/init_spec.rb index 3685cd9c36..18f77f29fd 100644 --- a/spec/commands/init_spec.rb +++ b/spec/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] == "2." 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 set 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/commands/inject_spec.rb b/spec/commands/inject_spec.rb index 7ae0369955..da31849be7 100644 --- a/spec/commands/inject_spec.rb +++ b/spec/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}" @@ -37,14 +37,14 @@ RSpec.describe "bundle inject", :bundler => "< 2" do context "with injected gems already in the Gemfile" do it "doesn't add existing gems" do bundle "inject 'rack' '> 0'" - expect(out).to match(/cannot specify the same gem twice/i) + expect(err).to match(/cannot specify the same gem twice/i) end end context "incorrect arguments" do it "fails when more than 2 arguments are passed" do bundle "inject gem_name 1 v" - expect(out).to eq(<<-E.strip) + expect(err).to eq(<<-E.strip) ERROR: "bundle inject" was called with arguments ["gem_name", "1", "v"] Usage: "bundle inject GEM VERSION" E @@ -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 set --local deployment true" else bundle! "config set --local frozen true" @@ -109,7 +109,7 @@ Usage: "bundle inject GEM VERSION" gem "rack-obama" G bundle "inject 'rack' '> 0'" - expect(out).to match(/trying to install in deployment mode after changing/) + expect(err).to match(/trying to install in deployment mode after changing/) expect(bundled_app("Gemfile.lock").read).not_to match(/rack-obama/) end diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb index c198797862..21157dd309 100644 --- a/spec/commands/install_spec.rb +++ b/spec/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/commands/list_spec.rb b/spec/commands/list_spec.rb index e88d7bfb04..346b47517e 100644 --- a/spec/commands/list_spec.rb +++ b/spec/commands/list_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle list", :bundler => ">= 2" do +RSpec.describe "bundle list" do context "with name-only and paths option" do it "raises an error" do bundle "list --name-only --paths" diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index 48a984a879..843bebf6e0 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -419,7 +419,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/commands/package_spec.rb b/spec/commands/package_spec.rb index b0b451b582..6cd8e3f85a 100644 --- a/spec/commands/package_spec.rb +++ b/spec/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/commands/pristine_spec.rb b/spec/commands/pristine_spec.rb index d747fb9844..93eb81f2af 100644 --- a/spec/commands/pristine_spec.rb +++ b/spec/commands/pristine_spec.rb @@ -48,7 +48,14 @@ RSpec.describe "bundle pristine", :ruby_repo do bundle! "install" bundle! "pristine", :system_bundler => true bundle! "-v", :system_bundler => true - expect(out).to end_with(Bundler::VERSION) + + expected = if Bundler::VERSION < "3.0" + "Bundler version" + else + Bundler::VERSION + end + + expect(out).to start_with(expected) end end diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb index 6634a3f7ed..8fb6631f82 100644 --- a/spec/commands/show_spec.rb +++ b/spec/commands/show_spec.rb @@ -30,7 +30,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s) end - it "prints deprecation", :bundler => "2" do + it "prints deprecation" do bundle "show rails" expect(err).to eq("[DEPRECATED] use `bundle info rails` instead of `bundle show rails`") end @@ -40,7 +40,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s) end - it "prints deprecation when called with a gem and the --paths option", :bundler => "2" do + it "prints deprecation when called with a gem and the --paths option" do bundle "show rails --paths" expect(err).to eq("[DEPRECATED] use `bundle info rails --path` instead of `bundle show rails --paths`") end @@ -59,7 +59,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(out).to eq(root.to_s) end - it "prints deprecation when called with bundler", :bundler => "2" do + it "prints deprecation when called with bundler" do bundle "show bundler" expect(err).to eq("[DEPRECATED] use `bundle info bundler` instead of `bundle show bundler`") end @@ -79,7 +79,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(gem_list).to eq(gem_list.sort) end - it "prints a deprecation when called with the --paths option", :bundler => 2 do + it "prints a deprecation when called with the --paths option" do bundle "show --paths" expect(err).to eq("[DEPRECATED] use `bundle list` instead of `bundle show --paths`") @@ -226,3 +226,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do end end end + +RSpec.describe "bundle show", :bundler => "3" do + pending "shows a friendly error about the command removal" +end diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb index 243b06e049..46c208db6c 100644 --- a/spec/commands/update_spec.rb +++ b/spec/commands/update_spec.rb @@ -12,7 +12,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" @@ -35,7 +35,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" @@ -280,23 +280,23 @@ 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 => true expect(last_command).to be_failure - expect(out).to match(/You are trying to install in deployment mode after changing.your Gemfile/m) - expect(out).to match(/freeze \nby running `bundle install --no-deployment`./m) + expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m) + expect(err).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 set --global frozen 1" bundle "update", :all => true - expect(out).to match(/You are trying to install in deployment mode after changing.your Gemfile/m). + expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m). and match(/freeze \nby running `bundle config unset 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 set --global deployment true" bundle "update", :all => true expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m). @@ -305,7 +305,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" @@ -316,7 +316,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" @@ -359,7 +359,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| @@ -372,7 +372,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| @@ -404,7 +404,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| @@ -418,7 +418,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| @@ -562,14 +562,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 => true 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") @@ -578,7 +578,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/commands/version_spec.rb b/spec/commands/version_spec.rb index b919c25e0f..66c7930397 100644 --- a/spec/commands/version_spec.rb +++ b/spec/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 |