diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-16 13:55:09 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-16 13:55:09 +0000 |
commit | 0ebf9b176380e691d3505e6c96cb0e33c6d892e4 (patch) | |
tree | 830e7a0e1821edf0488e74e22ae4e0a0e520c74d /lib/test/unit/collector.rb | |
parent | 7485e91f76b7149c421900934adb146913142f8c (diff) | |
download | ruby-0ebf9b176380e691d3505e6c96cb0e33c6d892e4.tar.gz |
* lib/test/unit: removed test/unit.
* lib/test/unit.rb: new compatibility layer using minitest.
* bin/testrb: use above.
* test/runner.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit/collector.rb')
-rw-r--r-- | lib/test/unit/collector.rb | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/test/unit/collector.rb b/lib/test/unit/collector.rb deleted file mode 100644 index 9e9e654147..0000000000 --- a/lib/test/unit/collector.rb +++ /dev/null @@ -1,43 +0,0 @@ -module Test - module Unit - module Collector - def initialize - @filters = [] - end - - def filter=(filters) - @filters = case(filters) - when Proc - [filters] - when Array - filters - end - end - - def add_suite(destination, suite) - to_delete = suite.tests.find_all{|t| !include?(t)} - to_delete.each{|t| suite.delete(t)} - destination << suite unless(suite.size == 0) - end - - def include?(test) - return true if(@filters.empty?) - @filters.each do |filter| - result = filter[test] - if(result.nil?) - next - elsif(!result) - return false - else - return true - end - end - true - end - - def sort(suites) - suites.sort_by{|s| s.name} - end - end - end -end |