diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 21:39:21 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 21:39:21 +0000 |
commit | 777aac883bc05bc8221778ec3f22ef98019c1da6 (patch) | |
tree | 242b78f76dd823c3c4894cae01968f207bbd10b6 | |
parent | 423cd349b4be830959aa9cf6f590487ea49d612f (diff) | |
download | ruby-777aac883bc05bc8221778ec3f22ef98019c1da6.tar.gz ruby-777aac883bc05bc8221778ec3f22ef98019c1da6.tar.xz ruby-777aac883bc05bc8221778ec3f22ef98019c1da6.zip |
Added changes needed for miniunit. usually from using internal calls that aren't needed anymore.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/ipaddr.rb | 1 | ||||
-rw-r--r-- | test/fileutils/fileasserts.rb | 4 | ||||
-rwxr-xr-x | test/json/test_json.rb | 1 | ||||
-rw-r--r-- | test/rss/rss-assertions.rb | 4 | ||||
-rw-r--r-- | test/runner.rb | 13 |
5 files changed, 20 insertions, 3 deletions
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb index 7c246326c..26364cd9c 100644 --- a/lib/ipaddr.rb +++ b/lib/ipaddr.rb @@ -577,7 +577,6 @@ end __END__ require 'test/unit' -require 'test/unit/ui/console/testrunner' class TC_IPAddr < Test::Unit::TestCase def test_s_new diff --git a/test/fileutils/fileasserts.rb b/test/fileutils/fileasserts.rb index 41469a6ac..d78454455 100644 --- a/test/fileutils/fileasserts.rb +++ b/test/fileutils/fileasserts.rb @@ -4,6 +4,10 @@ module Test module Unit module Assertions # redefine + def _wrap_assertion + yield + end + def assert_same_file(from, to) _wrap_assertion { assert_block("file #{from} != #{to}") { diff --git a/test/json/test_json.rb b/test/json/test_json.rb index 0ee993eb8..2c706d52f 100755 --- a/test/json/test_json.rb +++ b/test/json/test_json.rb @@ -29,7 +29,6 @@ class TC_JSON < Test::Unit::TestCase @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') diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb index 12e53f7cd..88634f360 100644 --- a/test/rss/rss-assertions.rb +++ b/test/rss/rss-assertions.rb @@ -2,6 +2,10 @@ require 'erb' 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) diff --git a/test/runner.rb b/test/runner.rb index f9ed25a93..0295260ba 100644 --- a/test/runner.rb +++ b/test/runner.rb @@ -6,4 +6,15 @@ rcsid = %w$Id$ 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 |