Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > test/unit/assertionsライブラリ > Test::Unit::Assertionsモジュール > assert_match

instance method Test::Unit::Assertions#assert_match

assert_match(pattern, string, message="") -> ()

string =~ pattern が真ならばパスします。

[EXCEPTION] Test::Unit::AssertionFailedError:
assert が失敗した時に発生します。