mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use libraries in the base directory if given
This commit is contained in:
parent
4c1db84d17
commit
46771abfe5
1 changed files with 2 additions and 1 deletions
|
@ -1123,10 +1123,11 @@ module Test
|
||||||
def initialize(force_standalone = false, default_dir = nil, argv = ARGV)
|
def initialize(force_standalone = false, default_dir = nil, argv = ARGV)
|
||||||
@force_standalone = force_standalone
|
@force_standalone = force_standalone
|
||||||
@runner = Runner.new do |files, options|
|
@runner = Runner.new do |files, options|
|
||||||
options[:base_directory] ||= default_dir
|
base = options[:base_directory] ||= default_dir
|
||||||
files << default_dir if files.empty? and default_dir
|
files << default_dir if files.empty? and default_dir
|
||||||
@to_run = files
|
@to_run = files
|
||||||
yield self if block_given?
|
yield self if block_given?
|
||||||
|
$LOAD_PATH.unshift base if base
|
||||||
files
|
files
|
||||||
end
|
end
|
||||||
Runner.runner = @runner
|
Runner.runner = @runner
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue