I'm using Ruby 2.0 with MiniTest. I'd like to drop to byebug if an error occurs during the test so that it can be easily debugged. Is it possible to override MiniTest's default action on error?
Asked
Active
Viewed 981 times
1 Answers
0
You need something like minitest-debugger, but specific to byebug. Shouldn't be too difficult to create.

blowmage
- 8,854
- 2
- 35
- 40
-
Yes, that'd be nice to have... and it shouldn't be that hard. – deivid Jun 14 '13 at 13:58
-
1Unfortunately this isn't helpful. The project you linked just overrides the `assert` method to drop to the debugger on assertion errors. I have tried, and it doesn't affect normal errors in any way. I'd have to override another method but I don't know which. – Hubro Jun 14 '13 at 21:58
-
Ah, ok. So you want to drop to byebug on errors, not on failures. You could try catching the specific exception or using post-mortem mode – deivid Jun 17 '13 at 17:07
-
It looks that the OP was not asking for this, but someone just released [minitest-byebug](https://github.com/kaspth/minitest-byebug)! :) – deivid Aug 28 '13 at 01:30