有没有可能以编程方式设置断点...那是..。启动RubyMine使用的调试器ruby-debug-ide?
我的目标是在测试失败时自动启动它。
发布于 2015-02-14 16:05:06
当你的问题出现时,我正在寻找与此相关的东西。那么,您想要做的是在某些(或任何)测试失败时中断?为此,可以使用debugger命令。
只需将begin...rescue块添加到测试中,如下所示
begin
test 'todo' do
result = todo
assert_equal 25, result
end
rescue Minitest::Assertion => e
debugger
如果您没有使用Minitest,请将Minitest::断言替换为适当的断言,例如Test::Unit::AssertionFailedError for Test::Unit。
https://stackoverflow.com/questions/26926910
复制相似问题