summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/bundler/commands/install_spec.rb2
-rw-r--r--spec/bundler/support/helpers.rb16
2 files changed, 2 insertions, 16 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 8506005746..c3d0f281a0 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -118,7 +118,7 @@ RSpec.describe "bundle install with gem sources" do
it "does not state that it's constantly reinstalling empty gems" do
build_repo4 do
- build_gem "empty", "1.0.0", no_default: true, allowed_warning: "no files specified"
+ build_gem "empty", "1.0.0", no_default: true
end
install_gemfile <<~G
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index 719a6e65d2..12ff09b714 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -192,13 +192,7 @@ module Spec
# command is expired too. So give `gem install` commands a bit more time.
options[:timeout] = 120
- allowed_warning = options.delete(:allowed_warning)
-
- output = sys_exec("#{Path.gem_bin} #{command}", options)
- stderr = last_command.stderr
-
- raise stderr if stderr.include?("WARNING") && !allowed_rubygems_warning?(stderr, allowed_warning)
- output
+ sys_exec("#{Path.gem_bin} #{command}", options)
end
def sys_exec(cmd, options = {}, &block)
@@ -537,14 +531,6 @@ module Spec
private
- def allowed_rubygems_warning?(text, extra_allowed_warning)
- allowed_warnings = ["open-ended", "is a symlink", "rake based", "expected RubyGems version"]
- allowed_warnings << extra_allowed_warning if extra_allowed_warning
- allowed_warnings.any? do |warning|
- text.include?(warning)
- end
- end
-
def match_source(contents)
match = /source ["']?(?<source>http[^"']+)["']?/.match(contents)
return unless match