From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/ruby/test/testunit/test_assertion.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 jni/ruby/test/testunit/test_assertion.rb (limited to 'jni/ruby/test/testunit/test_assertion.rb') diff --git a/jni/ruby/test/testunit/test_assertion.rb b/jni/ruby/test/testunit/test_assertion.rb new file mode 100644 index 0000000..374d6e0 --- /dev/null +++ b/jni/ruby/test/testunit/test_assertion.rb @@ -0,0 +1,8 @@ +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 +end -- cgit v1.2.3