diff options
| author | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-06 14:03:21 +0000 |
|---|---|---|
| committer | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-06 14:03:21 +0000 |
| commit | 85bf3647e463d7ca5e0b5a655170a08068acc37e (patch) | |
| tree | 0b388ae81f068b8678630d42504c035e61e55f05 /lib/test/unit/testsuite.rb | |
| parent | 582f4c8db438b700c2e351730fb2836e2a507326 (diff) | |
| download | ruby-85bf3647e463d7ca5e0b5a655170a08068acc37e.tar.gz ruby-85bf3647e463d7ca5e0b5a655170a08068acc37e.tar.xz ruby-85bf3647e463d7ca5e0b5a655170a08068acc37e.zip | |
* lib/test/unit/testcase.rb: Added equality checking.
* lib/test/unit/testsuite.rb: Added equality checking.
* lib/test/unit/assertions.rb: Fixed a warning.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit/testsuite.rb')
| -rw-r--r-- | lib/test/unit/testsuite.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/test/unit/testsuite.rb b/lib/test/unit/testsuite.rb index e3a164cb6..589ad7151 100644 --- a/lib/test/unit/testsuite.rb +++ b/lib/test/unit/testsuite.rb @@ -1,7 +1,7 @@ # :nodoc: # # Author:: Nathaniel Talbott. -# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. +# Copyright:: Copyright (c) 2000-2003 Nathaniel Talbott. All rights reserved. # License:: Ruby license. module Test @@ -59,6 +59,13 @@ module Test def to_s @name end + + # It's handy to be able to compare TestSuite instances. + def ==(other) + return false unless(other.kind_of?(self.class)) + return false unless(@name == other.name) + @tests == other.tests + end end end end |
