diff options
| author | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-03 04:04:26 +0000 |
|---|---|---|
| committer | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-03 04:04:26 +0000 |
| commit | ee5fb5f5b6428a60282f5a7ec03447ee0c25f98a (patch) | |
| tree | 7c6b5615a066416daa97dcff825824d53d28eb40 /lib/test/unit | |
| parent | 1ecd8732e82a4450cdd1d547957632c9ff284ca9 (diff) | |
| download | ruby-ee5fb5f5b6428a60282f5a7ec03447ee0c25f98a.tar.gz ruby-ee5fb5f5b6428a60282f5a7ec03447ee0c25f98a.tar.xz ruby-ee5fb5f5b6428a60282f5a7ec03447ee0c25f98a.zip | |
* lib/test/unit.rb: refactored to use optparse.
* lib/test/unit.rb: added support for selecting the output
level from the command-line.
* lib/test/unit.rb: added a command-line switch to stop processing
the command-line, allowing arguments to be passed to tests.
* lib/test/unit.rb: changed the method for specifying a runner or a
filter from the command-line.
* lib/test/unit/collector/objectspace.rb: fixed a bug causing all
tests to be excluded when the filter was set to an empty array.
* test/testunit/collector/test_objectspace.rb: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit')
| -rw-r--r-- | lib/test/unit/collector/objectspace.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/test/unit/collector/objectspace.rb b/lib/test/unit/collector/objectspace.rb index 162f1ec4f..ac79980d7 100644 --- a/lib/test/unit/collector/objectspace.rb +++ b/lib/test/unit/collector/objectspace.rb @@ -10,6 +10,7 @@ module Test def initialize(source=::ObjectSpace) @source = source + @filters = [] end def collect(name=NAME) @@ -23,7 +24,7 @@ module Test end def include(test) - return true unless(@filters) + return true if(@filters.empty?) @filters.each do |filter| return true if(filter.call(test)) end |
