diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-06-23 17:13:11 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-23 23:29:07 -0500 |
commit | 6b40a8a22bfb3f04e677a3de4d5b9329c689d2c2 (patch) | |
tree | 446a39339e9616e0f000cb1fbc9ac4f1003d7efb /spec/support/indexes.rb | |
parent | f1ffdf65a07f5764c42dfd6bbb044d6afeda0b86 (diff) | |
download | bundler-6b40a8a22bfb3f04e677a3de4d5b9329c689d2c2.tar.gz |
Get the Bundler 2 specs passing with transitive source pinning
Diffstat (limited to 'spec/support/indexes.rb')
-rw-r--r-- | spec/support/indexes.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb index bb941e66ab..1feff7d816 100644 --- a/spec/support/indexes.rb +++ b/spec/support/indexes.rb @@ -16,12 +16,16 @@ module Spec def resolve(args = []) @platforms ||= ["ruby"] deps = [] + default_source = instance_double("Bundler::Source::Rubygems", :specs => @index) + source_requirements = { :default => default_source } @deps.each do |d| @platforms.each do |p| + source_requirements[d.name] = d.source = default_source deps << Bundler::DepProxy.new(d, p) end end - Bundler::Resolver.resolve(deps, @index, *args) + source_requirements ||= {} + Bundler::Resolver.resolve(deps, @index, source_requirements, *args) end def should_resolve_as(specs) @@ -62,7 +66,7 @@ module Spec s.level = opts.first s.strict = opts.include?(:strict) end - should_resolve_and_include specs, [{}, @base, search] + should_resolve_and_include specs, [@base, search] end def an_awesome_index |