Tag: tap

Ruby“test / unit”,如何在断言中显示消息

我在ruby脚本中有断言。 这些断言中的每一个也都有描述断言的消息。 所以我有两个围绕这个问题的问题 我希望在测试过程中显示与每个断言关联的消息。 目前,只有在任何事情失败时才显示消息 当任何断言失败时,整个测试退出。 即使一个断言失败,我如何继续测试? 我正在使用的示例代码 assert_match(“hey”, “hey this is a test”, “The word exists in the string”) 所以输出目前看起来像 – ruby ruby11.rb -vv Loaded suite ruby Started test_ruby(Ruby): F Finished in 40.555587 seconds. 1) Failure: test_ruby11(Ruby11) [ruby11.rb:73]: Text box not displayed is not true. 1 tests, 3 assertions, 1 failures, 0 errors 我希望它看起来像 […]