From 852dc6d663a934aa30b4b526dcbb60394ae7d50d Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 30 Sep 2008 06:57:34 +0000 Subject: Updated miniunit to 4257. This cleans all my tests when run in isolation. I still have failures when run with everything else git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/mini/test_mini_test.rb | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/mini/test_mini_test.rb b/test/mini/test_mini_test.rb index 661c2965a2..b7071f55af 100644 --- a/test/mini/test_mini_test.rb +++ b/test/mini/test_mini_test.rb @@ -9,11 +9,6 @@ require 'mini/test' Mini::Test.autorun -class Mini::Test - attr_accessor :test_count - attr_accessor :assertion_count -end - class TestMiniTest < Mini::Test::TestCase def setup @@ -47,13 +42,25 @@ class TestMiniTest < Mini::Test::TestCase BT_MIDDLE + ["./lib/mini/test.rb:29", "test/test_autotest.rb:422"]) + bt = util_expand_bt bt + ex = ["lib/autotest.rb:571:in `add_exception'", "test/test_autotest.rb:62:in `test_add_exception'"] + ex = util_expand_bt ex + fu = Mini::filter_backtrace(bt) assert_equal ex, fu end + def util_expand_bt bt + if RUBY_VERSION =~ /^1\.9/ then + bt.map { |f| (f =~ /^\./) ? File.expand_path(f) : f } + else + bt + end + end + def test_filter_backtrace_all_unit bt = (["./lib/mini/test.rb:165:in `__send__'"] + BT_MIDDLE + @@ -68,6 +75,9 @@ class TestMiniTest < Mini::Test::TestCase BT_MIDDLE + ["./lib/mini/test.rb:29", "-e:1"]) + + bt = util_expand_bt bt + ex = ["-e:1"] fu = Mini::filter_backtrace(bt) assert_equal ex, fu -- cgit v1.2.3