ruby-changes:7981
From: ryan <ko1@a...>
Date: Wed, 24 Sep 2008 06:39:37 +0900 (JST)
Subject: [ruby-changes:7981] Ruby:r19504 (trunk): Added changes needed for miniunit. usually from using internal calls that aren't needed anymore.
ryan 2008-09-24 06:39:21 +0900 (Wed, 24 Sep 2008) New Revision: 19504 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19504 Log: Added changes needed for miniunit. usually from using internal calls that aren't needed anymore. Modified files: trunk/lib/ipaddr.rb trunk/test/fileutils/fileasserts.rb trunk/test/json/test_json.rb trunk/test/rss/rss-assertions.rb trunk/test/runner.rb Index: lib/ipaddr.rb =================================================================== --- lib/ipaddr.rb (revision 19503) +++ lib/ipaddr.rb (revision 19504) @@ -577,7 +577,6 @@ __END__ require 'test/unit' -require 'test/unit/ui/console/testrunner' class TC_IPAddr < Test::Unit::TestCase def test_s_new Index: test/fileutils/fileasserts.rb =================================================================== --- test/fileutils/fileasserts.rb (revision 19503) +++ test/fileutils/fileasserts.rb (revision 19504) @@ -4,6 +4,10 @@ module Unit module Assertions # redefine + def _wrap_assertion + yield + end + def assert_same_file(from, to) _wrap_assertion { assert_block("file #{from} != #{to}") { Index: test/json/test_json.rb =================================================================== --- test/json/test_json.rb (revision 19503) +++ test/json/test_json.rb (revision 19504) @@ -29,7 +29,6 @@ @json = '{"a":2,"b":3.141,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},' + '"g":"\\"\\u0000\\u001f","h":1.0E3,"i":1.0E-3}' end - suite << TC_JSON.suite def test_construction parser = JSON::Parser.new('test') Index: test/rss/rss-assertions.rb =================================================================== --- test/rss/rss-assertions.rb (revision 19503) +++ test/rss/rss-assertions.rb (revision 19504) @@ -2,6 +2,10 @@ module RSS module Assertions + def _wrap_assertion + yield + end + def assert_parse(rss, assert_method, *args) __send__("assert_#{assert_method}", *args) do ::RSS::Parser.parse(rss) Index: test/runner.rb =================================================================== --- test/runner.rb (revision 19503) +++ test/runner.rb (revision 19504) @@ -6,4 +6,15 @@ Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze Release = rcsid[3].freeze -exit Test::Unit::AutoRunner.run(true, File.dirname($0)) +# not sure why these are needed now... but whatever +$:.push(*Dir["test/*"].find_all { |path| File.directory? path }) + +class Module + def tu_deprecation_warning old, new = nil, kaller = nil + # stfu - for now... + end +end + +(Dir["test/test_*.rb"] + Dir["test/**/test_*.rb"]).each do |test| + require test +end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/