blob: 64a1233dd151ad423e1bf8e434e3b3904e1503ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
RSpec.describe Bundler::Plugin::SourceList do
SourceList = Bundler::Plugin::SourceList
before do
allow(Bundler).to receive(:root) { Pathname.new "/" }
end
subject(:source_list) { SourceList.new }
describe "adding sources uses classes for plugin" do
it "uses Plugin::Installer::Rubygems for rubygems sources" do
source = source_list.
add_rubygems_source("remotes" => ["https://existing-rubygems.org"])
expect(source).to be_instance_of(Bundler::Plugin::Installer::Rubygems)
end
it "uses Plugin::Installer::Git for git sources" do
source = source_list.
add_git_source("uri" => "git://existing-git.org/path.git")
expect(source).to be_instance_of(Bundler::Plugin::Installer::Git)
end
end
end
|