summaryrefslogtreecommitdiff
path: root/tool/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-09 20:35:39 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-11 08:48:03 +0900
commit0a5844cbdd176977ec6f7e3cc31d2a1959f18759 (patch)
tree66c16939279bcc9e309bb276bc027ef7c50b4e94 /tool/test
parent6b5400ccde478da7734a769bfb87a1ebf626bb46 (diff)
downloadruby-0a5844cbdd176977ec6f7e3cc31d2a1959f18759.tar.gz
Removed output assertion tests. Because our default runner is replaced by custom output
Diffstat (limited to 'tool/test')
-rw-r--r--tool/test/testunit/test_minitest_unit.rb232
1 files changed, 0 insertions, 232 deletions
diff --git a/tool/test/testunit/test_minitest_unit.rb b/tool/test/testunit/test_minitest_unit.rb
index 8aa3aab40b..a88d3686ac 100644
--- a/tool/test/testunit/test_minitest_unit.rb
+++ b/tool/test/testunit/test_minitest_unit.rb
@@ -241,134 +241,6 @@ class TestMiniTestRunner < MetaMetaMetaTestCase
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
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