[前][次][番号順一覧][スレッド一覧]

ruby-changes:67897

From: Hiroshi <ko1@a...>
Date: Sat, 11 Sep 2021 08:48:34 +0900 (JST)
Subject: [ruby-changes:67897] 0a5844cbdd (master): Removed output assertion tests. Because our default runner is replaced by custom output

https://git.ruby-lang.org/ruby.git/commit/?id=0a5844cbdd

From 0a5844cbdd176977ec6f7e3cc31d2a1959f18759 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Thu, 9 Sep 2021 20:35:39 +0900
Subject: Removed output assertion tests. Because our default runner is
 replaced by custom output

---
 tool/test/testunit/test_minitest_unit.rb | 232 -------------------------------
 1 file changed, 232 deletions(-)

diff --git a/tool/test/testunit/test_minitest_unit.rb b/tool/test/testunit/test_minitest_unit.rb
index 8aa3aab..a88d368 100644
--- a/tool/test/testunit/test_minitest_unit.rb
+++ b/tool/test/testunit/test_minitest_unit.rb
@@ -241,134 +241,6 @@ class TestMiniTestRunner < MetaMetaMetaTestCase https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L241
     assert_equal [tc], Test::Unit::TestCase.test_suites
   end
 
-  def test_run_test
-    Class.new Test::Unit::TestCase do
-      attr_reader :foo
-
-      def run_test name
-        @foo = "hi mom!"
-        super
-        @foo = "okay"
-      end
-
-      def test_something
-        assert_equal "hi mom!", foo
-      end
-    end
-
-    expected = clean <<-EOM
-      .
-
-      Finished tests in 0.00
-
-      1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
-    EOM
-
-    assert_report expected
-  end
-
-  def test_run_error
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-
-      def test_error
-        raise "unhandled exception"
-      end
-    end
-
-    expected = clean <<-EOM
-      E.
-
-      Finished tests in 0.00
-
-        1) Error:
-      #<Class:0xXXX>#test_error:
-      RuntimeError: unhandled exception
-          FILE:LINE:in \`test_error\'
-
-      2 tests, 1 assertions, 0 failures, 1 errors, 0 skips
-    EOM
-
-    assert_report expected
-  end
-
-  def test_run_error_teardown
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-
-      def teardown
-        raise "unhandled exception"
-      end
-    end
-
-    expected = clean <<-EOM
-      E
-
-      Finished tests in 0.00
-
-        1) Error:
-      #<Class:0xXXX>#test_something:
-      RuntimeError: unhandled exception
-          FILE:LINE:in \`teardown\'
-
-      1 tests, 1 assertions, 0 failures, 1 errors, 0 skips
-    EOM
-
-    assert_report expected
-  end
-
-  def test_run_failing
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-
-      def test_failure
-        assert false
-      end
-    end
-
-    expected = clean <<-EOM
-      F.
-
-      Finished tests in 0.00
-
-        1) Failure:
-      #<Class:0xXXX>#test_failure [FILE:LINE]:
-      Failed assertion, no message given.
-
-      2 tests, 2 assertions, 1 failures, 0 errors, 0 skips
-    EOM
-
-    assert_report expected
-  end
-
-  def test_run_failing_filtered
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-
-      def test_failure
-        assert false
-      end
-    end
-
-    expected = clean <<-EOM
-      .
-
-      Finished tests in 0.00
-
-      1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
-    EOM
-
-    assert_report expected, %w[--name /some|thing/ --seed 42]
-  end
-
   def assert_filtering name, expected, a = false
     args = %W[--name #{name} --seed 42]
 
@@ -392,110 +264,6 @@ class TestMiniTestRunner < MetaMetaMetaTestCase https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L264
     Object.send :remove_const, :Beta
   end
 
-  def test_run_filtered_including_suite_name
-    expected = clean <<-EOM
-      .
-
-      Finished tests in 0.00
-
-      1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
-    EOM
-
-    assert_filtering "/Beta#test_something/", expected
-  end
-
-  def test_run_filtered_including_suite_name_string
-    expected = clean <<-EOM
-      .
-
-      Finished tests in 0.00
-
-      1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
-    EOM
-
-    assert_filtering "Beta#test_something", expected
-  end
-
-  def test_run_filtered_string_method_only
-    expected = clean <<-EOM
-      ..
-
-      Finished tests in 0.00
-
-      2 tests, 2 assertions, 0 failures, 0 errors, 0 skips
-    EOM
-
-    assert_filtering "test_something", expected, :pass
-  end
-
-  def test_run_passing
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-    end
-
-    expected = clean <<-EOM
-      .
-
-      Finished tests in 0.00
-
-      1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
-    EOM
-
-    assert_report expected
-  end
-
-  def test_run_skip
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-
-      def test_skip
-        skip "not yet"
-      end
-    end
-
-    expected = clean <<-EOM
-      S.
-
-      Finished tests in 0.00
-
-      2 tests, 1 assertions, 0 failures, 0 errors, 1 skips
-    EOM
-
-    assert_report expected
-  end
-
-  def test_run_skip_verbose
-    Class.new Test::Unit::TestCase do
-      def test_something
-        assert true
-      end
-
-      def test_skip
-        skip "not yet"
-      end
-    end
-
-    expected = clean <<-EOM
-      #<Class:0xXXX>#test_skip = 0.00 s = S
-      #<Class:0xXXX>#test_something = 0.00 s = .
-
-
-      Finished tests in 0.00
-
-        1) Skipped:
-      #<Class:0xXXX>#test_skip [FILE:LINE]:
-      not yet
-
-      2 tests, 1 assertions, 0 failures, 0 errors, 1 skips
-    EOM
-
-    assert_report expected, %w[--seed 42 --verbose]
-  end
-
   def test_run_with_other_runner
     Test::Unit::Runner.runner = Class.new Test::Unit::Runner do
       def _run_suite suite, type
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]