Sha256: 37d32469af8c355f55647de09cb8806042eb43c5aedcda6ae019687c228596fb

Contents?: true

Size: 714 Bytes

Versions: 26

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/test_case'
require 'rubygems'
require 'shellwords'

class TestConfig < Gem::TestCase
  def test_datadir
    util_make_gems
    spec = Gem::Specification.find_by_name("a")
    spec.activate
    assert_equal "#{spec.full_gem_path}/data/a", spec.datadir
  end

  def test_good_rake_path_is_escaped
    path = Gem::TestCase.class_eval('@@good_rake')
    ruby, rake = path.shellsplit
    assert_equal(Gem.ruby, ruby)
    assert_match(/\/good_rake.rb\z/, rake)
  end

  def test_bad_rake_path_is_escaped
    path = Gem::TestCase.class_eval('@@bad_rake')
    ruby, rake = path.shellsplit
    assert_equal(Gem.ruby, ruby)
    assert_match(/\/bad_rake.rb\z/, rake)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rubygems-update-3.2.4 test/rubygems/test_config.rb
rubygems-update-3.2.3 test/rubygems/test_config.rb
rubygems-update-3.2.2 test/rubygems/test_config.rb
rubygems-update-3.2.1 test/rubygems/test_config.rb
rubygems-update-3.2.0 test/rubygems/test_config.rb
rubygems-update-3.2.0.rc.2 test/rubygems/test_config.rb