summaryrefslogtreecommitdiff
path: root/spec/resolver
diff options
context:
space:
mode:
authorchrismo <chrismo@clabs.org>2016-06-16 14:57:26 -0500
committerchrismo <chrismo@clabs.org>2016-07-08 19:35:57 -0500
commit80e1b176102c33bd0e89f4c28a9c7889980527df (patch)
tree60f332d5c4b62e7a55ecf65174b103096e08ceda /spec/resolver
parent100c3bbdf937e1efd423556957a79de84af11f37 (diff)
downloadbundler-80e1b176102c33bd0e89f4c28a9c7889980527df.tar.gz
First resolver spec and bug fix.
I stared at that code 2 or 3 times before seeing the obvious bug. Sigh. Anyway - needed to get these resolver specs going sooner or later. Both the first new resolver spec is passing as is the first update_spec spec (plus the pre-existing ones).
Diffstat (limited to 'spec/resolver')
-rw-r--r--spec/resolver/basic_spec.rb17
1 files changed, 14 insertions, 3 deletions
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index cb5bc45597..c35b0ea81a 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -100,8 +100,19 @@ describe "Resolving" do
deps << Bundler::DepProxy.new(d, "ruby")
end
- got = Bundler::Resolver.resolve(deps, @index, {}, [], Bundler::RubyVersion.new("1.8.7", nil, nil, nil))
- got = got.map(&:full_name).sort
- expect(got).to eq(%w(foo-1.0.0 bar-1.0.0).sort)
+ should_resolve_and_include %w(foo-1.0.0 bar-1.0.0), [{}, [], Bundler::RubyVersion.new("1.8.7", nil, nil, nil)]
+ end
+
+ context 'conservative' do
+ context 'patch' do
+ it 'resolves single gem with no dependencies' do
+ @index = build_index do
+ gem "foo", %w(1.0.0 1.0.1 1.0.2 1.1.0 2.0.0)
+ end
+ dep 'foo'
+
+ should_consv_resolve_and_include :patch, locked('foo', '1.0.0'), %w(foo-1.0.2)
+ end
+ end
end
end