* 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
@ -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>
|
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
|
* win32/win32.c (do_spawn, do_aspawn): should wait child process even
|
||||||
|
@ -67,12 +67,16 @@ module Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def collect_file(name, suites, already_gathered)
|
def collect_file(name, suites, already_gathered)
|
||||||
|
loadpath = $:.dup
|
||||||
|
$:.unshift(File.dirname(name))
|
||||||
if(@req)
|
if(@req)
|
||||||
@req.require(name)
|
@req.require(name)
|
||||||
else
|
else
|
||||||
require(name)
|
require(name)
|
||||||
end
|
end
|
||||||
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
|
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
|
||||||
|
ensure
|
||||||
|
$:.replace(loadpath)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user