Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/rubygems/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
# #files are the files in the .gem tar file, not the Ruby files in the gem
# #extract_files and #contents automatically call #verify

require "rubygems"
require 'rubygems/security'
require 'rubygems/specification'
require 'rubygems/user_interaction'
Expand Down
9 changes: 8 additions & 1 deletion test/rubygems/test_project_sanity.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# frozen_string_literal: true

require "rubygems/test_case"
require "open3"

class TestProjectSanity < Minitest::Test
class TestProjectSanity < Gem::TestCase

def test_manifest_is_up_to_date
skip unless File.exist?(File.expand_path("../../../Rakefile", __FILE__))
Expand All @@ -12,4 +13,10 @@ def test_manifest_is_up_to_date
assert status.success?, "Expected Manifest.txt to be up to date, but it's not. Run `rake update_manifest` to sync it."
end

def test_require_rubygems_package
err, status = Open3.capture2e(*ruby_with_rubygems_in_load_path, "--disable-gems", "-e", "'require \"rubygems/package\"'")

assert status.success?, err
end

end