diff options
-rw-r--r-- | lib/bundler/spec_set.rb | 10 | ||||
-rw-r--r-- | spec/bundler/bundler/spec_set_spec.rb | 18 |
2 files changed, 0 insertions, 28 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index cb8f0fd1b2..277824c34f 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -114,16 +114,6 @@ module Bundler @specs.select {|s| s.is_a?(LazySpecification) } end - def merge(set) - arr = sorted.dup - set.each do |set_spec| - full_name = set_spec.full_name - next if arr.any? {|spec| spec.full_name == full_name } - arr << set_spec - end - SpecSet.new(arr) - end - def -(other) SpecSet.new(to_a - other.to_a) end diff --git a/spec/bundler/bundler/spec_set_spec.rb b/spec/bundler/bundler/spec_set_spec.rb index 6fedd38b50..c4b6676223 100644 --- a/spec/bundler/bundler/spec_set_spec.rb +++ b/spec/bundler/bundler/spec_set_spec.rb @@ -45,24 +45,6 @@ RSpec.describe Bundler::SpecSet do end end - describe "#merge" do - let(:other_specs) do - [ - build_spec("f", "1.0"), - build_spec("g", "2.0"), - ].flatten - end - - let(:other_spec_set) { described_class.new(other_specs) } - - it "merges the items in each gemspec" do - new_spec_set = subject.merge(other_spec_set) - specs = new_spec_set.to_a.map(&:full_name) - expect(specs).to include("a-1.0") - expect(specs).to include("f-1.0") - end - end - describe "#to_a" do it "returns the specs in order" do expect(subject.to_a.map(&:full_name)).to eq %w[ |