diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-03-02 20:37:31 +0900 |
---|---|---|
committer | NARUSE, Yui <nurse@users.noreply.github.com> | 2021-03-11 17:24:52 +0900 |
commit | f375bc77d2f347dd2a44705b8abd29398feae427 (patch) | |
tree | 0988ab2b519e713ae653cc2e23609b339a9b5979 /spec/bundler/bundler/source_list_spec.rb | |
parent | 38f8b8d070aaac02f1d048b5d9947b2e58401e2b (diff) |
Merge RubyGems-3.2.11 and Bundler-2.2.11
Diffstat (limited to 'spec/bundler/bundler/source_list_spec.rb')
-rw-r--r-- | spec/bundler/bundler/source_list_spec.rb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/spec/bundler/bundler/source_list_spec.rb b/spec/bundler/bundler/source_list_spec.rb index 0c40ba8a77..3a0691b959 100644 --- a/spec/bundler/bundler/source_list_spec.rb +++ b/spec/bundler/bundler/source_list_spec.rb @@ -372,7 +372,26 @@ RSpec.describe Bundler::SourceList do source_list.add_git_source("uri" => "git://first-git.org/path.git") end - it "returns all sources, without combining rubygems sources" do + it "combines the rubygems sources into a single instance, removing duplicate remotes from the end", :bundler => "< 3" do + expect(source_list.lock_sources).to eq [ + Bundler::Source::Git.new("uri" => "git://first-git.org/path.git"), + Bundler::Source::Git.new("uri" => "git://second-git.org/path.git"), + Bundler::Source::Git.new("uri" => "git://third-git.org/path.git"), + ASourcePlugin.new("uri" => "https://second-plugin.org/random"), + ASourcePlugin.new("uri" => "https://third-bar.org/foo"), + Bundler::Source::Path.new("path" => "/first/path/to/gem"), + Bundler::Source::Path.new("path" => "/second/path/to/gem"), + Bundler::Source::Path.new("path" => "/third/path/to/gem"), + Bundler::Source::Rubygems.new("remotes" => [ + "https://duplicate-rubygems.org", + "https://first-rubygems.org", + "https://second-rubygems.org", + "https://third-rubygems.org", + ]), + ] + end + + it "returns all sources, without combining rubygems sources", :bundler => "3" do expect(source_list.lock_sources).to eq [ Bundler::Source::Git.new("uri" => "git://first-git.org/path.git"), Bundler::Source::Git.new("uri" => "git://second-git.org/path.git"), |