aboutsummaryrefslogtreecommitdiffstats
path: root/spec/quality_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/quality_spec.rb')
-rw-r--r--spec/quality_spec.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index 41f7d584..da495a8c 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -184,11 +184,17 @@ describe "The library itself" do
it "can still be built" do
Dir.chdir(root) do
- `gem build bundler.gemspec`
- expect($?).to eq(0)
-
- # clean up the .gem generated
- system("rm bundler-#{Bundler::VERSION}.gem")
+ begin
+ gem_command! :build, "bundler.gemspec"
+ if Bundler.rubygems.provides?(">= 2.4")
+ # older rubygems have weird warnings, and we won't actually be using them
+ # to build the gem for releases anyways
+ expect(err).to be_empty, "bundler should build as a gem without warnings, but\n#{err}"
+ end
+ ensure
+ # clean up the .gem generated
+ FileUtils.rm("bundler-#{Bundler::VERSION}.gem")
+ end
end
end