assert_false (続)
assert_false - Rubyとか Illustratorとか SFとか折紙とかより<プロジェクト>\test\test_helper.rb
def assert_false(boolean, message=nil) _wrap_assertion do assert_block("assert should not be called with a block.") { !block_given? } assert_block(build_message(message, "<?> is not false.", boolean)) { not boolean } end # _wrap_assertion do end # def assert(boolean, message=nil)
結局こんな感じ。
ruby-1.8\lib\ruby\1.8\test\unit\assertions.rb からコピペして真偽を修正。単純なコピペじゃなくてもっと良いやり方無いかな。まあ、test_helper.rb に更に幾つかアサーションを追加したくなったら考えよう。