1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/test/unit/collector.rb (collect_file): now deletes paths added

to $LOAD_PATH instead of restoring it verbatim.

	* lib/test/unit/autorunner.rb (AutoRunner.run): fixed so that
	  'ruby -rtest/unit -rtest1 -rtest2 -e0' will use the objectspace
	  collector again. Also tried to simplify the calling convention.

	* test/runner.rb: adjusted for new AutoRunner semantics.

	* lib/test/unit.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ntalbott 2005-02-17 04:50:49 +00:00
parent 966332ebed
commit f2d29b01cb
5 changed files with 29 additions and 12 deletions

View file

@ -75,9 +75,8 @@ module Test
end
def collect_file(name, suites, already_gathered)
loadpath = $:.dup
dir = File.dirname(File.expand_path(name))
$:.unshift(dir) unless $:.first == dir
$:.unshift(dir)
if(@req)
@req.require(name)
else
@ -85,7 +84,7 @@ module Test
end
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
ensure
$:.replace(loadpath)
$:.delete_at($:.rindex(dir)) if(dir)
end
end
end