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.24 test/rubygems/test_config.rb
rubygems-update-3.2.23 test/rubygems/test_config.rb
rubygems-update-3.2.22 test/rubygems/test_config.rb
rubygems-update-3.2.21 test/rubygems/test_config.rb
rubygems-update-3.2.20 test/rubygems/test_config.rb
rubygems-update-3.2.19 test/rubygems/test_config.rb
rubygems-update-3.2.18 test/rubygems/test_config.rb
rubygems-update-3.2.17 test/rubygems/test_config.rb
rubygems-update-3.2.16 test/rubygems/test_config.rb
rubygems-update-3.2.15 test/rubygems/test_config.rb
rubygems-update-3.2.14 test/rubygems/test_config.rb
rubygems-update-3.2.13 test/rubygems/test_config.rb
rubygems-update-3.2.12 test/rubygems/test_config.rb
rubygems-update-3.2.11 test/rubygems/test_config.rb
rubygems-update-3.2.10 test/rubygems/test_config.rb
rubygems-update-3.2.9 test/rubygems/test_config.rb
rubygems-update-3.2.8 test/rubygems/test_config.rb
rubygems-update-3.2.7 test/rubygems/test_config.rb
rubygems-update-3.2.6 test/rubygems/test_config.rb
rubygems-update-3.2.5 test/rubygems/test_config.rb