我在控制台中看到的内容?
Failure/Error: raise 'error text here'
RuntimeError:
error text here
我实际上需要在控制台中看到什么?
RuntimeError:
error text here
我不想突出显示指向脚本行的Failure/Error
。
对于您要查询的控制台部分:
Failure/Error
此消息是通过运行Rspec测试看到的。这是一个单元测试报告,运行测试用例失败。
在规格中遇到的实际错误将在report以下显示。 rspec报告不可自定义,但是在引发错误时,会显示消息can be modified。
例如:
raise RuntimeError, "error text here"