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
new file mode 100644
index 00000000000..374d6e022bd
--- /dev/null
+++ b/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