diff options
Diffstat (limited to 'lib/test/unit/testcase.rb')
| -rw-r--r-- | lib/test/unit/testcase.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/test/unit/testcase.rb b/lib/test/unit/testcase.rb index 2ccf19290..369c94434 100644 --- a/lib/test/unit/testcase.rb +++ b/lib/test/unit/testcase.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. require 'test/unit/assertions' @@ -147,6 +147,13 @@ module Test def to_s name end + + # It's handy to be able to compare TestCase instances. + def ==(other) + return false unless(other.kind_of?(self.class)) + return false unless(@method_name == other.method_name) + self.class == other.class + end end end end |
