summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-06-14 10:00:33 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-06-14 16:09:40 -0500
commit1f39ea35973c9eb8879efe29b7971e4c8f8171d8 (patch)
treeab3c6d3828ffefd797868fa7b003f178abba5e27
parent8645a5d741cf9e075bd6b1e16c223e255a8e8cc0 (diff)
downloadbundler-1f39ea35973c9eb8879efe29b7971e4c8f8171d8.tar.gz
Fix major deprecation spec to not accidentally cause deprecations
-rw-r--r--spec/other/major_deprecation_spec.rb22
1 files changed, 20 insertions, 2 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index f7a632bdcf..79654b18f6 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -22,11 +22,12 @@ RSpec.describe "major deprecations" do
before do
bundle "config major_deprecations true"
- install_gemfile <<-G
+ create_file "gems.rb", <<-G
source "file:#{gem_repo1}"
ruby #{RUBY_VERSION.dump}
gem "rack"
G
+ bundle! "install"
end
describe "bundle_ruby" do
@@ -89,6 +90,23 @@ RSpec.describe "major deprecations" do
end
end
+ describe "bundle update" do
+ before do
+ create_file("gems.rb", "")
+ bundle! "install"
+ end
+
+ it "warns when no options are given" do
+ bundle! "update"
+ expect(warnings).to have_major_deprecation a_string_including("Pass --all to `bundle update` to update everything")
+ end
+
+ it "does not warn when --all is passed" do
+ bundle! "update --all"
+ expect(warnings).not_to have_major_deprecation
+ end
+ end
+
describe "bundle install --binstubs" do
it "should output a deprecation warning" do
gemfile <<-G
@@ -241,7 +259,7 @@ RSpec.describe "major deprecations" do
bundle "console"
expect(warnings).to have_major_deprecation \
- "bundle console will be replaced by `bin/console` generated by `bundle gem <name>`"
+ a_string_including("bundle console will be replaced by `bin/console` generated by `bundle gem <name>`")
end
end
end