Skip to content

Commit

Permalink
Use ruby_with_rubygems_in_load_path helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bronzdoc committed Jun 3, 2020
1 parent 73c199b commit 5e6d82b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/rubygems/test_project_sanity.rb
Expand Up @@ -2,7 +2,7 @@

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 @@ -13,9 +13,11 @@ def test_manifest_is_up_to_date
end

def test_require_rubygems_package
_, status = Open3.capture2e("ruby -v --disable-gems -I 'lib' -e 'require \"rubygems/package\"'")
require "rubygems/test_case"

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

assert status.success?, err
end

end

0 comments on commit 5e6d82b

Please sign in to comment.