Method: Arrow::TestCase#assert_not_match
- Defined in:
- lib/arrow/testcase.rb
#assert_not_match(re, str) ⇒ Object
Assert that the specified str
does not match the given regular expression re
.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/arrow/testcase.rb', line 417 def assert_not_match( re, str ) msg = "<%s> expected not to match %p" % [ str, re ] assert_block( msg ) { !re.match( str ) } rescue Test::Unit::AssertionFailedError => err cutframe = err.backtrace.reverse.find {|frame| /assert_not_match/ =~ frame } firstIdx = (err.backtrace.rindex( cutframe )||0) + 1 Kernel.raise( err, err., err.backtrace[firstIdx..-1] ) end |