[test-unit-commit:00325] test-unit/test-unit [master] Add experimental top-level 'run' method

null+test-unit @ clear-code.com null+test-unit @ clear-code.com
2012年 3月 31日 (土) 09:17:19 UTC


Kouhei Sutou	2012-03-31 18:17:19 +0900 (Sat, 31 Mar 2012)

  New Revision: dd7fd2bafa17186d4d73b3802c33eecb5dff3ace

  Log:
    Add experimental top-level 'run' method
    
    It is for "ruby -rtest-unit -e run test/test_*.rb".

  Modified files:
    lib/test-unit.rb

  Modified: lib/test-unit.rb (+7 -0)
===================================================================
--- lib/test-unit.rb    2012-03-31 18:14:09 +0900 (10b482d)
+++ lib/test-unit.rb    2012-03-31 18:17:19 +0900 (b54a2a8)
@@ -4,3 +4,10 @@ module Test
     autoload :AutoRunner, "test/unit/autorunner"
   end
 end
+
+# experimental. It is for "ruby -rtest-unit -e run test/test_*.rb".
+# Is this API OK or dirty?
+def run
+  self.class.send(:undef_method, :run)
+  require "test/unit"
+end



test-unit-commit メーリングリストの案内