mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
prepend the directory of target file to the load path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9292a6254e
commit
8af34b7b33
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Oct 21 15:57:11 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
|
||||
prepend the directory of target file to the load path.
|
||||
|
||||
Tue Oct 21 15:08:53 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (do_spawn, do_aspawn): should wait child process even
|
||||
|
|
|
@ -67,12 +67,16 @@ module Test
|
|||
end
|
||||
|
||||
def collect_file(name, suites, already_gathered)
|
||||
loadpath = $:.dup
|
||||
$:.unshift(File.dirname(name))
|
||||
if(@req)
|
||||
@req.require(name)
|
||||
else
|
||||
require(name)
|
||||
end
|
||||
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
|
||||
ensure
|
||||
$:.replace(loadpath)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue