Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • runit/testcase.rb

Parent

Included Modules

RUNIT::TestCase

Public Class Methods

new(test_name, suite_name=self.class.name) click to toggle source
 
               # File runit/testcase.rb, line 28
def initialize(test_name, suite_name=self.class.name)
  super(test_name)
end
            
suite() click to toggle source
 
               # File runit/testcase.rb, line 15
def self.suite
  method_names = instance_methods(true)
  tests = method_names.delete_if { |method_name| method_name !~ /^test/ }
  suite = TestSuite.new(name)
  tests.each {
    |test|
    catch(:invalid_test) {
      suite << new(test, name)
    }
  }
  return suite
end
            

Public Instance Methods

assert_equals(*args) click to toggle source
 
               # File runit/testcase.rb, line 32
def assert_equals(*args)
  assert_equal(*args)
end
            
name() click to toggle source
 
               # File runit/testcase.rb, line 36
def name
  super.sub(/^(.*?)\((.*)\)$/, '\2#\1')
end
            
run(result, &progress_block) click to toggle source
 
               # File runit/testcase.rb, line 40
def run(result, &progress_block)
  progress_block = proc {} unless (block_given?)
  super(result, &progress_block)
end