Sha256: 19e6479da9f16fced2431dbeac044452ebf572a81a96974fe558d12cb114ef8f

Contents?: true

Size: 395 Bytes

Versions: 11

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

require_relative "helper"
require "rubygems"

class TestExit < Gem::TestCase
  def test_exit
    system(*ruby_with_rubygems_in_load_path, "-e", "raise Gem::SystemExitException.new(2)")
    assert_equal 2, $?.exitstatus
  end

  def test_status
    exc = Gem::SystemExitException.new(42)
    assert_equal 42, exc.status
    assert_equal 42, exc.exit_code
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rubygems-update-3.4.10 test/rubygems/test_exit.rb
rubygems-update-3.4.9 test/rubygems/test_exit.rb
rubygems-update-3.4.8 test/rubygems/test_exit.rb
rubygems-update-3.4.7 test/rubygems/test_exit.rb
rubygems-update-3.4.6 test/rubygems/test_exit.rb
rubygems-update-3.4.5 test/rubygems/test_exit.rb
rubygems-update-3.4.4 test/rubygems/test_exit.rb
rubygems-update-3.4.3 test/rubygems/test_exit.rb
rubygems-update-3.4.2 test/rubygems/test_exit.rb
rubygems-update-3.4.1 test/rubygems/test_exit.rb
rubygems-update-3.4.0 test/rubygems/test_exit.rb