bad_arg_helper(&scenario)
assert_raise ArgumentErrorexception is correctly raised in myfunc, this assert does not see it and the test fails
assert_raise ArgumentError
我有一个验证时间戳的程序,但是现在它使用正则表达式来验证它们。我想知道的是,是否有更简单的方法来验证以下格式的时间戳:05/03/2016 05:34:54 AM或PM。class TimeStampFormatError < StandardError; end
begin puts 'Invalid format of time