summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2021-12-27 19:37:32 -0300
committerAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2021-12-27 19:55:18 -0300
commita4d82ba3c94202e88b9dc0df6583c66ab4e5e793 (patch)
tree52667844f6b588b91b9bfdd8c12da08bffb91a02
parent74408e089dedc806c3e534379082f41248f1b236 (diff)
downloadpry-use-bundler-quiet-instead-of-monkey-patch.tar.gz
Use quiet: false for bundler/inline instead of monkeypatch for Bundler > 2.0use-bundler-quiet-instead-of-monkey-patch
-rw-r--r--spec/integration/bundler_spec.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/integration/bundler_spec.rb b/spec/integration/bundler_spec.rb
index 224616c2..a73f5f1e 100644
--- a/spec/integration/bundler_spec.rb
+++ b/spec/integration/bundler_spec.rb
@@ -13,12 +13,18 @@ RSpec.describe 'Bundler' do
require "bundler/inline"
require "pry"
- # Silence the "The Gemfile specifies no dependencies" warning
- class Bundler::UI::Shell
- def warn(*args, &block); end
+ options = {}
+
+ if Gem::Version.new(Bundler::VERSION) > Gem::Version.new("2.0")
+ options = { quiet: true }
+ else
+ # Silence the "The Gemfile specifies no dependencies" warning
+ class Bundler::UI::Shell
+ def warn(*args, &block); end
+ end
end
- gemfile(true) do
+ gemfile(true, options) do
source "https://rubygems.org"
end
exit 42 if Pry.config.completer