diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-16 14:30:39 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-16 14:30:39 +0200 |
commit | b88936cdc27372bc2ef0b45f1da927d343862742 (patch) | |
tree | 1eab7cbbc65b1433bf4e9900f7e03b2718308e58 | |
parent | b7fc6f4187dac4447da2c9d5bfae43e8295c26da (diff) | |
download | bundler-b88936cdc27372bc2ef0b45f1da927d343862742.tar.gz |
Merge all `bundle check --path` specsdeprecate_path_arg_to_check_and_package
And skip them all for bundler 3.
-rw-r--r-- | spec/commands/check_spec.rb | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb index 959b43352c..c755ef2804 100644 --- a/spec/commands/check_spec.rb +++ b/spec/commands/check_spec.rb @@ -239,37 +239,42 @@ RSpec.describe "bundle check" do end context "--path", :bundler => "< 3" do - before do - gemfile <<-G - source "#{file_uri_for(gem_repo1)}" - gem "rails" - G - bundle "install --path vendor/bundle" + context "after installing gems in the proper directory" do + before do + gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rails" + G + bundle "install --path vendor/bundle" + + FileUtils.rm_rf(bundled_app(".bundle")) + end - FileUtils.rm_rf(bundled_app(".bundle")) - end + it "returns success" do + bundle! "check --path vendor/bundle" + expect(out).to include("The Gemfile's dependencies are satisfied") + end - it "returns success" do - bundle! "check --path vendor/bundle" - expect(out).to include("The Gemfile's dependencies are satisfied") + it "should write to .bundle/config" do + bundle "check --path vendor/bundle" + bundle! "check" + end end - it "should write to .bundle/config" do - bundle "check --path vendor/bundle" - bundle! "check" - end - end + context "after installing gems on a different directory" do + before do + install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rails" + G - context "--path vendor/bundle after installing gems in the default directory" do - it "returns false" do - install_gemfile <<-G - source "#{file_uri_for(gem_repo1)}" - gem "rails" - G + bundle "check --path vendor/bundle" + end - bundle "check --path vendor/bundle" - expect(exitstatus).to eq(1) if exitstatus - expect(err).to match(/The following gems are missing/) + it "returns false" do + expect(exitstatus).to eq(1) if exitstatus + expect(err).to match(/The following gems are missing/) + end end end |