まあ、なんと云ふか、めんどくさかったりするし、D言語のunittest blockが羨ましかったりするし(〃l _ l)
assertion丈使ひたいので、Module: Test::Unit::Assertions (Ruby 2.0)を読み込む。
下記を読めば解る。
# license: Public Domain $DEBUG = true # @param test_name [String] def unittest test_name, &proc if $DEBUG include Test::Unit::Assertions proc.call puts "#{test_name} ok." end end if $DEBUG eval 'require "test/unit/assertions"' end unittest 'test of test' do assert_equal 2, 1 + 1 end