diff options
author | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-17 02:56:47 +0000 |
---|---|---|
committer | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-17 02:56:47 +0000 |
commit | f8989a0cdd9a8ff9d0087403e181689952879ca6 (patch) | |
tree | becf656aa3e0cb8b0f8ff2b2efdbfea48b814156 /lib/test/unit.rb | |
parent | ef46698d765a52c64c38a28d5229fd89e92b2e8d (diff) |
* 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/branches/ruby_1_8@7989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit.rb')
-rw-r--r-- | lib/test/unit.rb | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index f6f250a5cf..3a1676a330 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -240,35 +240,35 @@ module Test # class TS_MyTests # def self.suite # suite = Test::Unit::TestSuite.new -# suite << TC_MyFirstTests.suite -# suite << TC_MoreTestsByMe.suite -# suite << TS_AnotherSetOfTests.suite -# return suite -# end -# end -# Test::Unit::UI::Console::TestRunner.run(TS_MyTests) -# -# Now, this is a bit cumbersome, so Test::Unit does a little bit more -# for you, by wrapping these up automatically when you require -# 'test/unit'. What does this mean? It means you could write the above -# test case like this instead: -# -# require 'test/unit' -# require 'tc_myfirsttests' -# require 'tc_moretestsbyme' -# require 'ts_anothersetoftests' -# -# Test::Unit is smart enough to find all the test cases existing in -# the ObjectSpace and wrap them up into a suite for you. It then runs -# the dynamic suite using the console TestRunner. -# -# -# == Questions? -# -# I'd really like to get feedback from all levels of Ruby -# practitioners about typos, grammatical errors, unclear statements, -# missing points, etc., in this document (or any other). -# + # suite << TC_MyFirstTests.suite + # suite << TC_MoreTestsByMe.suite + # suite << TS_AnotherSetOfTests.suite + # return suite + # end + # end + # Test::Unit::UI::Console::TestRunner.run(TS_MyTests) + # + # Now, this is a bit cumbersome, so Test::Unit does a little bit more + # for you, by wrapping these up automatically when you require + # 'test/unit'. What does this mean? It means you could write the above + # test case like this instead: + # + # require 'test/unit' + # require 'tc_myfirsttests' + # require 'tc_moretestsbyme' + # require 'ts_anothersetoftests' + # + # Test::Unit is smart enough to find all the test cases existing in + # the ObjectSpace and wrap them up into a suite for you. It then runs + # the dynamic suite using the console TestRunner. + # + # + # == Questions? + # + # I'd really like to get feedback from all levels of Ruby + # practitioners about typos, grammatical errors, unclear statements, + # missing points, etc., in this document (or any other). + # module Unit def self.run=(flag) @run = flag @@ -282,6 +282,6 @@ end at_exit do unless $! || Test::Unit.run? - exit Test::Unit::AutoRunner.run($0 != "-e" && $0) + exit Test::Unit::AutoRunner.run end end |