Method: Test::Unit::TestCase#valid?
- Defined in:
- lib/test/unit/testcase.rb
#valid? ⇒ Boolean
Returns the test is valid test. It is used in internal.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/test/unit/testcase.rb', line 300 def valid? # :nodoc: return false unless respond_to?(@method_name) test_method = method(@method_name) if @internal_data.have_test_data? return false unless test_method.arity == 1 else return false unless test_method.arity <= 0 end owner = Util::MethodOwnerFinder.find(self, @method_name) if owner.class != Module and self.class != owner return false end true end |