# TestUnit assertions

**URL:** <https://www.ruby-forum.com/t/testunit-assertions/95787>\
**Category:** Ruby\
**Created:** [June 13, 2006, 6:53pm UTC](https://www.ruby-forum.com/t/testunit-assertions/95787 "2006-06-13T18:53:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [June 13, 2006, 6:53pm UTC](https://www.ruby-forum.com/t/testunit-assertions/95787/1 "2006-06-13T18:53:07Z")

</div>

In the teardown() method, I’ll like to obtain a list of the assertions,  
errors and failures that occurred during the test run. How can I do  
this?

---

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [June 14, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/testunit-assertions/95787/2 "2006-06-14T17:10:35Z")

</div>

_bump_

---

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [June 14, 2006, 5:25pm UTC](https://www.ruby-forum.com/t/testunit-assertions/95787/3 "2006-06-14T17:25:13Z")

</div>

On Jun 14, 2006, at 11:10 AM, Patrick S. wrote:

> _bump_
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

This is unacceptable. You apparently don’t know it, but you are  
posting to a Mailing-List, through a web gateway. You just sent an  
_email_ with the sole content of _bump_ to hundreds of people. Please  
don’t “bump” ever again.

---

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [June 14, 2006, 5:39pm UTC](https://www.ruby-forum.com/t/testunit-assertions/95787/4 "2006-06-14T17:39:38Z")

</div>

On Jun 14, 2006, at 16:10, Patrick S. wrote:

> _bump_

Please remember that the forum is a gateway to a mailing list, where  
'bump’ing is discouraged. If you don’t get an answer, the single  
best thing you can do is try to answer your own question and then ask  
more-specific questions about where you ran into problems.

> In the teardown() method, I’ll like to obtain a list of the  
> assertions,  
> errors and failures that occurred during the test run. How can I do  
> this?

Read the documentation: [http://www.ruby-doc.org/stdlib/libdoc/test/](http://www.ruby-doc.org/stdlib/libdoc/test/)  
unit/rdoc/

It’s hard to know exactly what you’re after, but it might be as  
simple as using Test::Unit::UI::Console::TestRunner with your test  
suite. In any case, I don’t think that the teardown method is  
exactly where you want to do this sort of thing, but rather in the  
test runner.

Best of luck.  
matthew smillie.
