summaryrefslogtreecommitdiff
path: root/test/testunit/test_assertion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/testunit/test_assertion.rb')
-rw-r--r--test/testunit/test_assertion.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/testunit/test_assertion.rb b/test/testunit/test_assertion.rb
index 4cd7bd7e452..7e772cc7b9f 100644
--- a/test/testunit/test_assertion.rb
+++ b/test/testunit/test_assertion.rb
@@ -6,4 +6,12 @@ class TestAssertion < Test::Unit::TestCase
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
end