1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/runner.rb
nobu 5b657b5dcb runner.rb: no installed gems
* test/runner.rb: get rid of loading previously installed gems.
  [ruby-dev:46025]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:21:55 +00:00

25 lines
752 B
Ruby

require 'rbconfig'
require 'test/unit'
src_testdir = File.dirname(File.realpath(__FILE__))
$LOAD_PATH << src_testdir
module Gem
end
class Gem::TestCase < MiniTest::Unit::TestCase
@@project_dir = File.dirname($LOAD_PATH.last)
end
srcdir = File.dirname(src_testdir)
default_gems = Dir.glob(srcdir + "/{lib,ext}/**/*.gemspec").map {|path| File.basename(path, ".*")}
File.foreach(srcdir + "/defs/default_gems") do |line|
next if /^\s*#/ =~ line
default_gems << line[/^\S+/]
end
default_gems |= (ENV["GEM_SKIP"] || '').split(/:/)
ENV["GEM_SKIP"] = default_gems.join(':')
ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
require_relative 'profile_test_all' if ENV['RUBY_TEST_ALL_PROFILE'] == 'true'
exit Test::Unit::AutoRunner.run(true, src_testdir)