aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-11-01 10:11:01 +0900
committerHomu <homu@barosl.com>2016-11-01 10:11:01 +0900
commitc68d4af2adc95e552a1cf8293216531cc93611f8 (patch)
tree626a896cbb4f296eb8071ae350804cce34a816d4 /spec
parent2483cc7e60df077de7e2c13fee99328328ff297f (diff)
parent24435561ac889454fd30c7b9f3800df351db4554 (diff)
downloadbundler-c68d4af2adc95e552a1cf8293216531cc93611f8.tar.gz
Auto merge of #5108 - chrismo:cons_update_docs, r=indirect
[WIP] New patch level and conservative options documented. Fixes #4775.
Diffstat (limited to 'spec')
-rw-r--r--spec/commands/update_spec.rb12
-rw-r--r--spec/resolver/basic_spec.rb16
2 files changed, 10 insertions, 18 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index f5c155e7..63fe951c 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -526,8 +526,6 @@ describe "bundle update conservative" do
expect(the_bundle).to include_gems "foo 1.4.5", "bar 2.1.1", "qux 1.0.1"
end
-
- it "warns on minor or major increment elsewhere" ## include in prior test
end
context "minor preferred" do
@@ -536,10 +534,6 @@ describe "bundle update conservative" do
expect(the_bundle).to include_gems "foo 1.5.1", "bar 3.0.0", "qux 1.0.0"
end
-
- it "warns on major increment elsewhere" ## include in prior test
-
- it "warns when something unlocked doesn't update at all"
end
context "strict" do
@@ -652,10 +646,4 @@ describe "bundle update conservative" do
expect(out).to eq "Provide only one of the following options: minor, patch"
end
end
-
- context "other commands" do
- it "Installer could support --dry-run flag for install and update"
-
- it "outdated should conform its flags to the resolver flags"
- end
end
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index 3e8883d1..e3187726 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -214,18 +214,22 @@ describe "Resolving" do
should_conservative_resolve_and_include :patch, [], %w(foo-1.4.4 bar-2.1.1)
end
- it "will not revert to a previous version in strict mode level patch" do
- pending "possible issue with molinillo - needs further research"
- should_conservative_resolve_and_include [:patch, :strict], [], %w(foo-1.4.3 bar-2.1.1)
+ it "cannot revert to a previous version in strict mode level patch" do
+ # the strict option removes the version required to match, so a version conflict results
+ expect do
+ should_conservative_resolve_and_include [:patch, :strict], [], %w(foo-1.4.3 bar-2.1.1)
+ end.to raise_error Bundler::VersionConflict, /#{Regexp.escape("Could not find gem 'bar (~> 2.1.0)'")}/
end
it "could revert to a previous version level minor" do
should_conservative_resolve_and_include :minor, [], %w(foo-1.5.0 bar-2.0.5)
end
- it "will not revert to a previous version in strict mode level minor" do
- pending "possible issue with molinillo - needs further research"
- should_conservative_resolve_and_include [:minor, :strict], [], %w(foo-1.4.3 bar-2.1.1)
+ it "cannot revert to a previous version in strict mode level minor" do
+ # the strict option removes the version required to match, so a version conflict results
+ expect do
+ should_conservative_resolve_and_include [:minor, :strict], [], %w(foo-1.4.3 bar-2.1.1)
+ end.to raise_error Bundler::VersionConflict, /#{Regexp.escape("Could not find gem 'bar (~> 2.0.0)'")}/
end
end
end