diff options
author | David RodrÃguez <[email protected]> | 2021-05-28 12:47:49 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-07-07 13:30:20 +0900 |
commit | 6e2240a2f954c84ed12357382c9c065ae4b91e11 (patch) | |
tree | ef4b33a9a67843cbc45aad510d7bca9f2a763496 /spec/bundler/commands/check_spec.rb | |
parent | 9952e9358ea73a1bda8d5f8c8672ee1c04892ce4 (diff) |
Sync latest bundler & rubygems development version
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4533
Diffstat (limited to 'spec/bundler/commands/check_spec.rb')
-rw-r--r-- | spec/bundler/commands/check_spec.rb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb index 2fb03186be..2860c82a12 100644 --- a/spec/bundler/commands/check_spec.rb +++ b/spec/bundler/commands/check_spec.rb @@ -288,6 +288,66 @@ RSpec.describe "bundle check" do end end + describe "when using only scoped rubygems sources" do + before do + gemfile <<~G + source "#{file_uri_for(gem_repo1)}" do + gem "rack" + end + G + end + + it "returns success when the Gemfile is satisfied" do + system_gems "rack-1.0.0", :path => default_bundle_path + bundle :check + expect(out).to include("The Gemfile's dependencies are satisfied") + end + end + + describe "when using only scoped rubygems sources with indirect dependencies" do + before do + build_repo4 do + build_gem "depends_on_rack" do |s| + s.add_dependency "rack" + end + + build_gem "rack" + end + + gemfile <<~G + source "#{file_uri_for(gem_repo4)}" do + gem "depends_on_rack" + end + G + end + + it "returns success when the Gemfile is satisfied and generates a correct lockfile" do + system_gems "depends_on_rack-1.0", "rack-1.0", :gem_repo => gem_repo4, :path => default_bundle_path + bundle :check + expect(out).to include("The Gemfile's dependencies are satisfied") + expect(lockfile).to eq <<~L + GEM + specs: + + GEM + remote: #{file_uri_for(gem_repo4)}/ + specs: + depends_on_rack (1.0) + rack + rack (1.0) + + PLATFORMS + #{lockfile_platforms} + + DEPENDENCIES + depends_on_rack! + + BUNDLED WITH + #{Bundler::VERSION} + L + end + end + describe "BUNDLED WITH" do def lock_with(bundler_version = nil) lock = <<-L |