summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-12 18:03:44 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-14 12:07:16 +0100
commit59652415cfe26353633eb415514f3fd39d443237 (patch)
treeb1afcc7db218f1b171fa81dac8212c9de58e1d2f
parentb65b0753de844f33a03ebfcc7ef490856f5a72e3 (diff)
downloadbundler-59652415cfe26353633eb415514f3fd39d443237.tar.gz
Make deprecation specs less messy
-rw-r--r--spec/other/major_deprecation_spec.rb26
1 files changed, 12 insertions, 14 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index de9c05ec67..fabf6321d1 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -3,16 +3,16 @@
RSpec.describe "major deprecations" do
let(:warnings) { err }
- before do
- create_file "gems.rb", <<-G
- source "file:#{gem_repo1}"
- ruby #{RUBY_VERSION.dump}
- gem "rack"
- G
- bundle! "install"
- end
-
describe "Bundler" do
+ before do
+ create_file "gems.rb", <<-G
+ source "file:#{gem_repo1}"
+ ruby #{RUBY_VERSION.dump}
+ gem "rack"
+ G
+ bundle! "install"
+ end
+
describe ".clean_env" do
it "is deprecated in favor of .unbundled_env" do
source = "Bundler.clean_env"
@@ -61,10 +61,6 @@ RSpec.describe "major deprecations" do
describe "bundle install --binstubs" do
xit "should output a deprecation warning" do
- gemfile <<-G
- gem 'rack'
- G
-
bundle :install, :binstubs => true
expect(warnings).to have_major_deprecation a_string_including("The --binstubs option will be removed")
end
@@ -111,12 +107,14 @@ RSpec.describe "major deprecations" do
end
context "with flags" do
- it "should print a deprecation warning about autoremembering flags", :bundler => "3" do
+ before do
install_gemfile <<-G, :path => "vendor/bundle"
source "file://#{gem_repo1}"
gem "rack"
G
+ end
+ it "should print a deprecation warning about autoremembering flags", :bundler => "3" do
expect(warnings).to have_major_deprecation a_string_including(
"flags passed to commands will no longer be automatically remembered."
)