|
11 | 11 |
|
12 | 12 | subject(:source_list) { Bundler::SourceList.new } |
13 | 13 |
|
14 | | - let(:rubygems_aggregate) { Bundler::Source::Rubygems.new } |
| 14 | + let(:global_rubygems_source) { Bundler::Source::Rubygems.new } |
15 | 15 | let(:metadata_source) { Bundler::Source::Metadata.new } |
16 | 16 |
|
17 | 17 | describe "adding sources" do |
|
118 | 118 | describe "#add_global_rubygems_remote" do |
119 | 119 | let!(:returned_source) { source_list.add_global_rubygems_remote("https://rubygems.org/") } |
120 | 120 |
|
121 | | - it "returns the aggregate rubygems source" do |
| 121 | + it "returns the global rubygems source" do |
122 | 122 | expect(returned_source).to be_instance_of(Bundler::Source::Rubygems) |
123 | 123 | end |
124 | 124 |
|
125 | | - it "adds the provided remote to the beginning of the aggregate source" do |
| 125 | + it "adds the provided remote to the beginning of the global source" do |
126 | 126 | source_list.add_global_rubygems_remote("https://othersource.org") |
127 | 127 | expect(returned_source.remotes).to eq [ |
128 | 128 | Gem::URI("https://othersource.org/"), |
|
156 | 156 | end |
157 | 157 |
|
158 | 158 | describe "#all_sources" do |
159 | | - it "includes the aggregate rubygems source when rubygems sources have been added" do |
| 159 | + it "includes the global rubygems source when rubygems sources have been added" do |
160 | 160 | source_list.add_git_source("uri" => "git://host/path.git") |
161 | 161 | source_list.add_rubygems_source("remotes" => ["https://rubygems.org"]) |
162 | 162 | source_list.add_path_source("path" => "/path/to/gem") |
163 | 163 | source_list.add_plugin_source("new_source", "uri" => "https://some.url/a") |
164 | 164 |
|
165 | | - expect(source_list.all_sources).to include rubygems_aggregate |
| 165 | + expect(source_list.all_sources).to include global_rubygems_source |
166 | 166 | end |
167 | 167 |
|
168 | | - it "includes the aggregate rubygems source when no rubygems sources have been added" do |
| 168 | + it "includes the global rubygems source when no rubygems sources have been added" do |
169 | 169 | source_list.add_git_source("uri" => "git://host/path.git") |
170 | 170 | source_list.add_path_source("path" => "/path/to/gem") |
171 | 171 | source_list.add_plugin_source("new_source", "uri" => "https://some.url/a") |
172 | 172 |
|
173 | | - expect(source_list.all_sources).to include rubygems_aggregate |
| 173 | + expect(source_list.all_sources).to include global_rubygems_source |
174 | 174 | end |
175 | 175 |
|
176 | 176 | it "returns sources of the same type in the reverse order that they were added" do |
|
204 | 204 | Bundler::Source::Rubygems.new("remotes" => ["https://third-rubygems.org"]), |
205 | 205 | Bundler::Source::Rubygems.new("remotes" => ["https://fourth-rubygems.org"]), |
206 | 206 | Bundler::Source::Rubygems.new("remotes" => ["https://fifth-rubygems.org"]), |
207 | | - rubygems_aggregate, |
| 207 | + global_rubygems_source, |
208 | 208 | metadata_source, |
209 | 209 | ] |
210 | 210 | end |
|
297 | 297 | end |
298 | 298 |
|
299 | 299 | describe "#rubygems_sources" do |
300 | | - it "includes the aggregate rubygems source when rubygems sources have been added" do |
| 300 | + it "includes the global rubygems source when rubygems sources have been added" do |
301 | 301 | source_list.add_git_source("uri" => "git://host/path.git") |
302 | 302 | source_list.add_rubygems_source("remotes" => ["https://rubygems.org"]) |
303 | 303 | source_list.add_path_source("path" => "/path/to/gem") |
304 | 304 |
|
305 | | - expect(source_list.rubygems_sources).to include rubygems_aggregate |
| 305 | + expect(source_list.rubygems_sources).to include global_rubygems_source |
306 | 306 | end |
307 | 307 |
|
308 | | - it "returns only the aggregate rubygems source when no rubygems sources have been added" do |
| 308 | + it "returns only the global rubygems source when no rubygems sources have been added" do |
309 | 309 | source_list.add_git_source("uri" => "git://host/path.git") |
310 | 310 | source_list.add_path_source("path" => "/path/to/gem") |
311 | 311 |
|
312 | | - expect(source_list.rubygems_sources).to eq [rubygems_aggregate] |
| 312 | + expect(source_list.rubygems_sources).to eq [global_rubygems_source] |
313 | 313 | end |
314 | 314 |
|
315 | 315 | it "returns rubygems sources in the reverse order that they were added" do |
|
331 | 331 | Bundler::Source::Rubygems.new("remotes" => ["https://third-rubygems.org"]), |
332 | 332 | Bundler::Source::Rubygems.new("remotes" => ["https://fourth-rubygems.org"]), |
333 | 333 | Bundler::Source::Rubygems.new("remotes" => ["https://fifth-rubygems.org"]), |
334 | | - rubygems_aggregate, |
| 334 | + global_rubygems_source, |
335 | 335 | ] |
336 | 336 | end |
337 | 337 | end |
|
0 commit comments