# How do I run all my unit tests?

**URL:** <https://www.ruby-forum.com/t/how-do-i-run-all-my-unit-tests/108873>\
**Category:** Rails\
**Created:** [July 8, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/how-do-i-run-all-my-unit-tests/108873 "2007-07-08T16:28:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [July 8, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/how-do-i-run-all-my-unit-tests/108873/1 "2007-07-08T16:28:07Z")

</div>

Sorry for the silly question. I know how to run a single unit test.  
How do I run them all?

Thanks,  
Perry

---

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [July 8, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/how-do-i-run-all-my-unit-tests/108873/2 "2007-07-08T17:03:44Z")

</div>

Perry S. wrote:

> Sorry for the silly question. I know how to run a single unit test.  
> How do I run them all?

Open a command line and enter:

```
rake

```

Then, to learn more about rake’s prowess…

rake --tasks | more

Then get ZenTest’s autotest, and leave it running at all times. 66% of  
your  
edits should be among the tests. Each time you change anything, save  
everything and watch autotest’s output.

Using these techniques…

[http://phlip.eblogs.com/2007/01/02/growl-driven-development/](http://phlip.eblogs.com/2007/01/02/growl-driven-development/)

…you can also make your tests say “yeah” or “no” if they pass or fail.

If they fail, you have the option to undo or revert your last edit.  
(That  
implies you should integrate to SVN each and every time your code is in  
a  
good state that you might want to revert to.) These techniques prevent  
wasting hours of debugging!

–  
Phlip  
[Test Driven Ajax (on Rails) [Book]](http://www.oreilly.com/catalog/9780596510657/)  
“Test Driven Ajax (on Rails)”  
assert\_xpath, assert\_javascript, & assert\_ajax
