diff options
Diffstat (limited to 'jni/ruby/test/testunit/test_assertion.rb')
-rw-r--r-- | jni/ruby/test/testunit/test_assertion.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |