ruby-1.9.3 を使って...
ブロックと Procs に関する正規のブログ投稿をいくつか読みましたが、これら 2 つの状況が異なる理由がわかりません。
module TestHelpers
  def bad_arg_helper(&scenario)
    # this works fine, test passes (without the next line)
    assert_raise ArgumentError, "wrong type of arguments, pass Fixnum or Range parameters", { Myclass.myfunc "bad" }
    # even though the exception is correctly raised in myfunc, this assert does not see it and the test fails
    assert_raise ArgumentError, "wrong type of arguments, pass Fixnum or Range parameters", scenario.call
  end
end
class TestClass < Test::Unit::TestCase
  include TestHelpers
  def test_bad_args
    bad_arg_helper { Myclass.myfunc "bad" }
  end
end
ブロックを別のモジュールのテスト ヘルパーに渡すにはどうすればよいですか?