From: Alexander Kellett Date: 2004-08-15T23:45:13+09:00 Subject: Re: Test::Unit feature request - regexp pattern of tests to run On Sun, Aug 15, 2004 at 10:43:02PM +0900, Simon Strandgaard wrote: > It would be awesome if I could say > prompt> ruby test_me.rb --name "test_.*something.*" i use the following snippet of code but obviously it would be much nicer to have it builtin - require "test/unit" class TC_MyTest < Test::Unit::TestCase DO_TEST = :test_undo_redo def test_match end def test_undo_redo end public_instance_methods.each { |meth| next if meth !~ /^test.*/ or meth.to_sym == DO_TEST remove_method meth.to_sym } if defined? DO_TEST end require 'test/unit/ui/console/testrunner' Test::Unit::UI::Console::TestRunner.run(TC_MyTest) Alex