Sha256: 5a2269228f65b23eb124888451c9c20e7492234ff2c0da14a9c72fb857c2cc9f
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
# Author:: Nathaniel Talbott. # Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. # License:: Ruby license. require 'runit/testresult' require 'runit/testsuite' require 'runit/assert' require 'runit/error' require 'test/unit/testcase' module RUNIT class TestCase < Test::Unit::TestCase include RUNIT::Assert 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 def initialize(test_name, suite_name=self.class.name) super(test_name) end def assert_equals(*args) assert_equal(*args) end def name super.sub(/^(.*?)\((.*)\)$/, '\2#\1') end def run(result, &progress_block) progress_block = proc {} unless (block_given?) super(result, &progress_block) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_on_ruby-0.0.1 | vendor/javascripts/emscripted-ruby/lib/runit/testcase.rb |