From a4d82ba3c94202e88b9dc0df6583c66ab4e5e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Mon, 27 Dec 2021 19:37:32 -0300 Subject: Use quiet: false for bundler/inline instead of monkeypatch for Bundler > 2.0 --- spec/integration/bundler_spec.rb | 14 ++++++++++---- 1 file 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 -- cgit v1.2.1