summaryrefslogtreecommitdiff
path: root/test/testunit/test_assertion.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-01 21:05:55 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-02 07:59:54 +0900
commitc68781e9181cb43af1bac29b3c974887205c3bf3 (patch)
tree34019fe4147362f117fdc0b23d2b3533a956ccb5 /test/testunit/test_assertion.rb
parentc3c0e3f5c9444c197779cb242de46dfffda79dec (diff)
Split test files for test-framework that are test-unit and minitest to tool direcotry.
Diffstat (limited to 'test/testunit/test_assertion.rb')
-rw-r--r--test/testunit/test_assertion.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/testunit/test_assertion.rb b/test/testunit/test_assertion.rb
deleted file mode 100644
index 0c7c4882b86..00000000000
--- a/test/testunit/test_assertion.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: false
-require 'test/unit'
-class TestAssertion < Test::Unit::TestCase
- def test_wrong_assertion
- error, line = assert_raise(ArgumentError) {assert(true, true)}, __LINE__
- assert_match(/assertion message must be String or Proc, but TrueClass was given/, error.message)
- assert_match(/\A#{Regexp.quote(__FILE__)}:#{line}:/, error.backtrace[0])
- end
-
- def test_timeout_separately
- assert_raise(Timeout::Error) do
- assert_separately([], <<~"end;", timeout: 0.1)
- sleep
- end;
- end
- end
-
- def return_in_assert_raise
- assert_raise(RuntimeError) do
- return
- end
- end
-
- def test_assert_raise
- assert_raise(MiniTest::Assertion) do
- return_in_assert_raise
- end
- end
-end