summaryrefslogtreecommitdiff
path: root/spec/other
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-05-02 14:03:46 +0000
committerBundlerbot <bot@bundler.io>2019-05-02 14:03:46 +0000
commitd18b74650bffbcd682cc9c5287ceb61df798b277 (patch)
treef68aef349988fbe75b09551bd9139ee9b180c838 /spec/other
parentf75efc27501ca4390abbae3d8846d0e54dab048b (diff)
parent3717fa176255caad57e1cb2a54836910f83bb805 (diff)
downloadbundler-d18b74650bffbcd682cc9c5287ceb61df798b277.tar.gz
Merge #7147
7147: Fix specs with rubygems master installed globally r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was if you have rubygems's master installed globally, bundler specs no longer pass. ### What was your diagnosis of the problem? My diagnosis was that having rubygems master installed, installs bundler's master as a default gem. That actually makes bundler behave better. In particular, `bundle show` and `bundle licenses` start properly handling the `bundler` gem itself. ### What is your fix for the problem, implemented in this PR? My fix is to change bundler's code to fix this specs in every situation, and not only when the bundler version being tested is also installed as a default gem. NOTE: I also included some changes to unify `bundle show` deprecation specs in the file that tests all deprecations. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/major_deprecation_spec.rb26
1 files changed, 25 insertions, 1 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 83944e4075..8ee48f55d5 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -480,9 +480,33 @@ The :gist git source is deprecated, and will be removed in the future. Add this
it "prints a deprecation warning recommending `bundle info`", :bundler => "2" do
expect(deprecations).to include("use `bundle info rack` instead of `bundle show rack`")
end
+
+ pending "fails with a helpful message", :bundler => "3"
end
- pending "fails with a helpful message", :bundler => "3"
+ context "with the --paths option" do
+ before do
+ bundle "show --paths"
+ end
+
+ it "prints a deprecation warning recommending `bundle list`", :bundler => "2" do
+ expect(deprecations).to include("use `bundle list` instead of `bundle show --paths`")
+ end
+
+ pending "fails with a helpful message", :bundler => "3"
+ end
+
+ context "with a gem argument and the --paths option" do
+ before do
+ bundle "show rack --paths"
+ end
+
+ it "prints deprecation warning recommending `bundle info`", :bundler => "2" do
+ expect(deprecations).to include("use `bundle info rack --path` instead of `bundle show rack --paths`")
+ end
+
+ pending "fails with a helpful message", :bundler => "3"
+ end
end
context "bundle console" do