We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d715462 commit f0de312Copy full SHA for f0de312
lib/appraisal/gemfile.rb
@@ -97,7 +97,7 @@ def gemspec(options = {})
97
protected
98
99
def source_entry
100
- @sources.map { |source| "source #{source.inspect}" }.join("\n")
+ @sources.uniq.map { |source| "source #{source.inspect}" }.join("\n")
101
end
102
103
def ruby_version_entry
spec/appraisal/gemfile_spec.rb
@@ -17,6 +17,13 @@
17
expect(gemfile.to_s.strip).to eq %{source "one"\nsource "two"}
18
19
20
+ it "ignores duplicate sources" do
21
+ gemfile = Appraisal::Gemfile.new
22
+ gemfile.source "one"
23
24
+ expect(gemfile.to_s.strip).to eq %{source "one"}
25
+ end
26
+
27
it "preserves dependency order" do
28
gemfile = Appraisal::Gemfile.new
29
gemfile.gem "one"
0 commit comments