New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit: Errors in teardown are not recorded #221
Conversation
Any objections? It passes all but one of your scenarios, which I've renamed to |
OK. I went a bit apeshit overhauling the tests but the essence is exactly the same (minus my objection above). Please see my changes in c4a4d92 and review. Thanks! |
I won't have time to review your changes in more detail until later tonight, but I wanted to comment on the change you made to #3. Since I haven't looked at the code, I might have the details wrong below. I thought of doing it this way (extra call to However, if I understand your explanation correctly, you've changed the semantics of |
I've had a chance to look at the code now. I really like what you did with the tests. Much better than what I had. Very nice. Other than that, my earlier comment about the change in semantics stands. I like the new semantics better, because it gives clients the opportunity to report both errors. So, as long as you're OK with a potential downstream surprise, that's fine with me. I'll probably put together a pull request for minitest-reporters to deal with the new semantics. |
This is probably a separate issue because in this case the errors occur in the setup call, but apart from that I'm seeing similar behavior to the original topic with minitest 4.6.0 and various versions of minitest-reporters including the latest (0.14.7). When I run functionals the summary reports 7 errors (expected errors for missing functionality on my side) but not a single stacktrace is printed. Instead the following can be found at the end of the output:
When I set 'minitest', '< 4.2.0' (resulting in 4.1.0) in the Gemfile the exceptions get printed and the reporter works as expected in RubyMine 5.0. |
Please don't line wrap the terminal output. It's impossible to read On Feb 12, 2013, at 3:14, bogn notifications@github.com wrote:
|
When an error or assertion failure occurs in a
teardown
method, it is not recorded correctly. That is,record
has been sent with the passing test information beforeteardown
is sent, and no further information is recorded after that. This doesn't affect the standard runner, because it relies onpuke
to do its job. But it affects other runners that rely onrecord
instead, such as minitest-reporters.This pull request consists of three commits:
record
. There may be a better way to write these tests.teardown
, record the one from the test body.See also the related issue I filed for minitest-reporters.