Skip to content

Commit

Permalink
Add bunded gems on $LOAD_PATH.
Browse files Browse the repository at this point in the history
Some test expects some gems to be available on $LOAD_PATH. For example,
RubyGem's test suite requires Rake.

This is currently rather naive implementation, since we don't have
RubyGems at hand to use something like
Gem::Specification#add_self_to_load_path.
  • Loading branch information
voxik committed Apr 3, 2015
1 parent aa0e36f commit 7d2b6a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/runner.rb
Expand Up @@ -4,6 +4,11 @@
$LOAD_PATH << src_testdir
$LOAD_PATH.unshift "#{src_testdir}/lib"

# Get bundled gems on load path
Dir.glob("#{src_testdir}/../gems/*/*.gemspec")
.reject {|f| f =~ /minitest|test-unit|power_assert/ }
.map {|f| $LOAD_PATH.unshift File.join(File.dirname(f), "lib") }

require 'test/unit'

module Gem
Expand Down

0 comments on commit 7d2b6a8

Please sign in to comment.